* Fix CIs

* Fix docs

* Fix eslint-build

* Move file

* Move back

* Fix server ci

* Fix server ci

* Fix server ci

* Fix server ci

* Deactivate e2e tests

* Fix front

* Fix front

* Fix front

* Add twenty-zapier and twenty-utils to the yarn project

* fix

* fix

* Remove pull_request trigger
This commit is contained in:
Charles Bochet
2023-12-15 15:40:04 +01:00
committed by GitHub
parent 6e09ae61f9
commit 064e47b59a
26 changed files with 5251 additions and 9325 deletions

View File

@ -18,9 +18,9 @@ jobs:
with:
node-version: "18"
- name: Docs / Install Dependencies
run: cd docs && yarn
run: yarn
- name: Docs / Build Documentation
run: cd docs && yarn build
run: yarn nx build twenty-docs
vale:
name: runner / vale
runs-on: ubuntu-latest
@ -30,7 +30,7 @@ jobs:
with:
files: ${{ steps.directories.outputs.LIST }}
fail_on_error: true
vale_flags: "--minAlertLevel=error --config=docs/.vale.ini"
vale_flags: "--minAlertLevel=error --config=packages/twenty-docs/.vale.ini"
reporter: github-pr-check
token: ${{ github.token }}
filter_mode: nofilter

View File

@ -22,17 +22,17 @@ jobs:
- name: Cache front node modules
uses: actions/cache@v3
with:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
path: packages/twenty-front/node_modules
key: front-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache root node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: node_modules
key: root-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: root-node_modules-
- name: Front / Install Dependencies
run: cd front && yarn
run: yarn
front-pages-sb-test:
needs: front-yarn-install
runs-on: ci-8-cores
@ -50,31 +50,29 @@ jobs:
node-version: "18"
- name: Front / Write .env
run: |
cd front
cd packages/twenty-front
cp .env.example .env
- name: Cache front node modules
uses: actions/cache@v3
with:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
path: packages/twenty-front/node_modules
key: front-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache root node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
- name: Install dependencies
run: yarn
path: node_modules
key: root-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: root-node_modules-
- name: Install Playwright
run: cd front && npx playwright install
run: cd packages/twenty-front && npx playwright install
- name: Build Storybook
run: cd front && yarn storybook:pages:build --quiet
- name: Run storybook tests
run: |
cd front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --silent --port 6006" \
"yarn storybook:pages:coverage"
run: yarn nx storybook:pages:build --quiet twenty-front
# - name: Run storybook tests
# run: |
# cd packages/twenty-front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
# "npx http-server storybook-static --silent --port 6006" \
# "yarn storybook:pages:coverage"
front-modules-sb-test:
needs: front-yarn-install
runs-on: ci-4-cores
@ -92,29 +90,29 @@ jobs:
node-version: "18"
- name: Front / Write .env
run: |
cd front
cd packages/twenty-front
cp .env.example .env
- name: Cache front node modules
uses: actions/cache@v3
with:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
path: packages/twenty-front/node_modules
key: front-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache root node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: node_modules
key: root-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: root-node_modules-
- name: Install Playwright
run: cd front && npx playwright install
run: cd packages/twenty-front && npx playwright install
- name: Build Storybook
run: cd front && yarn storybook:modules:build --quiet
- name: Run storybook tests
run: |
cd front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --silent --port 6006" \
"yarn storybook:modules:coverage"
run: yarn nx storybook:modules:build --quiet twenty-front
# - name: Run storybook tests
# run: |
# cd packages/twenty-front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
# "npx http-server storybook-static --silent --port 6006" \
# "yarn storybook:modules:coverage"
front-lint:
needs: front-yarn-install
runs-on: ubuntu-latest
@ -133,19 +131,17 @@ jobs:
- name: Cache front node modules
uses: actions/cache@v3
with:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
path: packages/twenty-front/node_modules
key: front-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache root node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
- name: Front / Install Dependencies
run: cd front && yarn
path: node_modules
key: root-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: root-node_modules-
- name: Front / Run linter
run: cd front && yarn lint --config .eslintrc-ci.cjs
run: yarn nx lint:ci twenty-front
front-jest:
needs: front-yarn-install
runs-on: ubuntu-latest
@ -164,14 +160,14 @@ jobs:
- name: Cache front node modules
uses: actions/cache@v3
with:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
path: packages/twenty-front/node_modules
key: front-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache root node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: node_modules
key: root-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: root-node_modules-
- name: Front / Run jest
run: cd front && yarn test
run: yarn nx test twenty-front

View File

@ -9,20 +9,12 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: twentycrm/twenty-postgres
env:
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: twenty
POSTGRES_USER: twenty
POSTGRES_DB: test
POSTGRES_PORT: 5432
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
@ -34,10 +26,10 @@ jobs:
with:
node-version: "18"
- name: Server / Install Dependencies
run: cd server && yarn install
run: yarn
- name: Server / Run linter
run: cd server && yarn lint
run: yarn nx lint twenty-server
- name: Server / Run jest tests
run: cd server && yarn test
- name: Server / Run e2e tests
run: cd server && yarn test:e2e
run: yarn nx test twenty-server
# - name: Server / Run e2e tests
# run: yarn nx test:e2e twenty-server

View File

@ -29,7 +29,7 @@ jobs:
with:
node-version: "18"
- name: Utils / Install Dependencies
run: cd packages/twenty-utils && yarn
run: yarn
- name: Utils / Run Danger.js
run: cd packages/twenty-utils && yarn danger ci --use-github-checks --failOnErrors
env: