twenty/.github/workflows/ci-server.yaml

42 lines
1.1 KiB
YAML
Raw Normal View History

name: CI Server
on:
push:
branches:
- main
2023-09-17 02:33:23 +03:00
pull_request:
jobs:
2023-07-27 21:57:10 +03:00
server-test:
runs-on: ubuntu-latest
services:
postgres:
image: twentycrm/twenty-postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
2023-07-28 01:14:33 +03:00
ports:
- 5432:5432
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
2023-09-17 02:33:23 +03:00
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Server / Install Dependencies
run: yarn
- name: Server / Run linter
run: yarn nx lint twenty-server
- name: Server / Run jest tests
run: yarn nx test twenty-server
- name: Server / Build
run: yarn nx build twenty-server
- name: Server / Write .env
run: |
cd packages/twenty-server
cp .env.example .env
- name: Worker / Run
run: MESSAGE_QUEUE_TYPE=sync yarn nx queue:work twenty-server