0da5cf29de
Bumps [eslint](https://github.com/eslint/eslint) from 9.32.0 to 9.39.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/eslint/eslint/releases">eslint's releases</a>.</em></p> <blockquote> <h2>v9.39.2</h2> <h2>Bug Fixes</h2> <ul> <li><a href="https://github.com/eslint/eslint/commit/57058331946568164449c5caabe2cf206e4fb5d9"><code>5705833</code></a> fix: warn when <code>eslint-env</code> configuration comments are found (<a href="https://redirect.github.com/eslint/eslint/issues/20381">#20381</a>) (sethamus)</li> </ul> <h2>Build Related</h2> <ul> <li><a href="https://github.com/eslint/eslint/commit/506f1549a64aa65bdddc75c71cb62f0ab94b5a23"><code>506f154</code></a> build: add .scss files entry to knip (<a href="https://redirect.github.com/eslint/eslint/issues/20391">#20391</a>) (Milos Djermanovic)</li> </ul> <h2>Chores</h2> <ul> <li><a href="https://github.com/eslint/eslint/commit/7ca0af7f9f89dd4a01736dae01931c45d528171b"><code>7ca0af7</code></a> chore: upgrade to <code>@eslint/js@9.39.2</code> (<a href="https://redirect.github.com/eslint/eslint/issues/20394">#20394</a>) (Francesco Trotta)</li> <li><a href="https://github.com/eslint/eslint/commit/c43ce24ff0ce073ec4ad691cd5a50171dfe6cf1e"><code>c43ce24</code></a> chore: package.json update for <code>@eslint/js</code> release (Jenkins)</li> <li><a href="https://github.com/eslint/eslint/commit/4c9858e47bb9146cf20f546a562bc58a9ee3dae1"><code>4c9858e</code></a> ci: add <code>v9.x-dev</code> branch (<a href="https://redirect.github.com/eslint/eslint/issues/20382">#20382</a>) (Milos Djermanovic)</li> </ul> <h2>v9.39.1</h2> <h2>Bug Fixes</h2> <ul> <li><a href="https://github.com/eslint/eslint/commit/650753ee3976784343ceb40170619dab1aa9fe0d"><code>650753e</code></a> fix: Only pass node to JS lang visitor methods (<a href="https://redirect.github.com/eslint/eslint/issues/20283">#20283</a>) (Nicholas C. Zakas)</li> </ul> <h2>Documentation</h2> <ul> <li><a href="https://github.com/eslint/eslint/commit/51b51f4f1ce82ef63264c4e45d9ef579bcd73f8e"><code>51b51f4</code></a> docs: add a section on when to use extends vs cascading (<a href="https://redirect.github.com/eslint/eslint/issues/20268">#20268</a>) (Tanuj Kanti)</li> <li><a href="https://github.com/eslint/eslint/commit/b44d42699dcd1729b7ecb50ca70e4c1c17f551f1"><code>b44d426</code></a> docs: Update README (GitHub Actions Bot)</li> </ul> <h2>Chores</h2> <ul> <li><a href="https://github.com/eslint/eslint/commit/92db329211c8da5ce8340a4d4c05ce9c12845381"><code>92db329</code></a> chore: update <code>@eslint/js</code> version to 9.39.1 (<a href="https://redirect.github.com/eslint/eslint/issues/20284">#20284</a>) (Francesco Trotta)</li> <li><a href="https://github.com/eslint/eslint/commit/c7ebefc9eaf99b76b30b0d3cf9960807a47367c4"><code>c7ebefc</code></a> chore: package.json update for <code>@eslint/js</code> release (Jenkins)</li> <li><a href="https://github.com/eslint/eslint/commit/61778f6ca33c0f63962a91d6a75a4fa5db9f47d2"><code>61778f6</code></a> chore: update eslint-config-eslint dependency <code>@eslint/js</code> to ^9.39.0 (<a href="https://redirect.github.com/eslint/eslint/issues/20275">#20275</a>) (renovate[bot])</li> <li><a href="https://github.com/eslint/eslint/commit/d9ca2fcd9ad63331bfd329a69534e1ff04f231e8"><code>d9ca2fc</code></a> ci: Add rangeStrategy to eslint group in renovate config (<a href="https://redirect.github.com/eslint/eslint/issues/20266">#20266</a>) (唯然)</li> <li><a href="https://github.com/eslint/eslint/commit/009e5076ff5a4bd845f55e17676e3bb88f47c280"><code>009e507</code></a> test: fix version tests for ESLint v10 (<a href="https://redirect.github.com/eslint/eslint/issues/20274">#20274</a>) (Milos Djermanovic)</li> </ul> <h2>v9.39.0</h2> <h2>Features</h2> <ul> <li><a href="https://github.com/eslint/eslint/commit/cc57d87a3f119e9d39c55e044e526ae067fa31ce"><code>cc57d87</code></a> feat: update error loc to key in <code>no-dupe-class-members</code> (<a href="https://redirect.github.com/eslint/eslint/issues/20259">#20259</a>) (Tanuj Kanti)</li> <li><a href="https://github.com/eslint/eslint/commit/126552fcf35da3ddcefa527db06dabc54c04041c"><code>126552f</code></a> feat: update error location in <code>for-direction</code> and <code>no-dupe-args</code> (<a href="https://redirect.github.com/eslint/eslint/issues/20258">#20258</a>) (Tanuj Kanti)</li> <li><a href="https://github.com/eslint/eslint/commit/167d0970d3802a66910e9820f31dcd717fab0b2a"><code>167d097</code></a> feat: update <code>complexity</code> rule to highlight only static block header (<a href="https://redirect.github.com/eslint/eslint/issues/20245">#20245</a>) (jaymarvelz)</li> </ul> <h2>Bug Fixes</h2> <ul> <li><a href="https://github.com/eslint/eslint/commit/15f5c7c168d0698683943f51dd617f14a5e6815c"><code>15f5c7c</code></a> fix: forward traversal <code>step.args</code> to visitors (<a href="https://redirect.github.com/eslint/eslint/issues/20253">#20253</a>) (jaymarvelz)</li> <li><a href="https://github.com/eslint/eslint/commit/5a1a534e877f7c4c992885867f923df307c3929d"><code>5a1a534</code></a> fix: allow JSDoc comments in object-shorthand rule (<a href="https://redirect.github.com/eslint/eslint/issues/20167">#20167</a>) (Nitin Kumar)</li> <li><a href="https://github.com/eslint/eslint/commit/e86b813eb660f1a5adc8e143a70d9b683cd12362"><code>e86b813</code></a> fix: Use more types from <code>@eslint/core</code> (<a href="https://redirect.github.com/eslint/eslint/issues/20257">#20257</a>) (Nicholas C. Zakas)</li> <li><a href="https://github.com/eslint/eslint/commit/927272d1f0d5683b029b729d368a96527f283323"><code>927272d</code></a> fix: correct <code>Scope</code> typings (<a href="https://redirect.github.com/eslint/eslint/issues/20198">#20198</a>) (jaymarvelz)</li> <li><a href="https://github.com/eslint/eslint/commit/37f76d9c539bb6fc816fedb7be4486b71a58620a"><code>37f76d9</code></a> fix: use <code>AST.Program</code> type for Program node (<a href="https://redirect.github.com/eslint/eslint/issues/20244">#20244</a>) (Francesco Trotta)</li> <li><a href="https://github.com/eslint/eslint/commit/ae07f0b3334ebd22ae2e7b09bca5973b96aa9768"><code>ae07f0b</code></a> fix: unify timing report for concurrent linting (<a href="https://redirect.github.com/eslint/eslint/issues/20188">#20188</a>) (jaymarvelz)</li> <li><a href="https://github.com/eslint/eslint/commit/b165d471be6062f4475b972155b02654a974a0e9"><code>b165d47</code></a> fix: correct <code>Rule</code> typings (<a href="https://redirect.github.com/eslint/eslint/issues/20199">#20199</a>) (jaymarvelz)</li> <li><a href="https://github.com/eslint/eslint/commit/fb97cda70d87286a7dbd2457f578ef578d6905e8"><code>fb97cda</code></a> fix: improve error message for missing fix function in suggestions (<a href="https://redirect.github.com/eslint/eslint/issues/20218">#20218</a>) (jaymarvelz)</li> </ul> <h2>Documentation</h2> <ul> <li><a href="https://github.com/eslint/eslint/commit/d3e81e30ee6be5a21151b7a17ef10a714b6059c0"><code>d3e81e3</code></a> docs: Always recommend to include a files property (<a href="https://redirect.github.com/eslint/eslint/issues/20158">#20158</a>) (Percy Ma)</li> <li><a href="https://github.com/eslint/eslint/commit/0f0385f1404dcadaba4812120b1ad02334dbd66a"><code>0f0385f</code></a> docs: use consistent naming recommendation (<a href="https://redirect.github.com/eslint/eslint/issues/20250">#20250</a>) (Alex M. Spieslechner)</li> <li><a href="https://github.com/eslint/eslint/commit/a3b145609ac649fac837c8c0515cbb2a9321ca40"><code>a3b1456</code></a> docs: Update README (GitHub Actions Bot)</li> <li><a href="https://github.com/eslint/eslint/commit/cf5f2dd58dd98084a21da04fe7b9054b9478d552"><code>cf5f2dd</code></a> docs: fix correct tag of <code>no-useless-constructor</code> (<a href="https://redirect.github.com/eslint/eslint/issues/20255">#20255</a>) (Tanuj Kanti)</li> <li><a href="https://github.com/eslint/eslint/commit/10b995c8e5473de8d66d3cd99d816e046f35e3ec"><code>10b995c</code></a> docs: add TS options and examples for <code>nofunc</code> in <code>no-use-before-define</code> (<a href="https://redirect.github.com/eslint/eslint/issues/20249">#20249</a>) (Tanuj Kanti)</li> <li><a href="https://github.com/eslint/eslint/commit/2584187e4a305ea7a98e1a5bd4dca2a60ad132f8"><code>2584187</code></a> docs: remove repetitive word in comment (<a href="https://redirect.github.com/eslint/eslint/issues/20242">#20242</a>) (reddaisyy)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/eslint/eslint/commit/9278324aa0023d223874825b0d4b6ac75783096a"><code>9278324</code></a> 9.39.2</li> <li><a href="https://github.com/eslint/eslint/commit/542266ad3c58b47066d4b8ae61d419b423acee8f"><code>542266a</code></a> Build: changelog update for 9.39.2</li> <li><a href="https://github.com/eslint/eslint/commit/7ca0af7f9f89dd4a01736dae01931c45d528171b"><code>7ca0af7</code></a> chore: upgrade to <code>@eslint/js@9.39.2</code> (<a href="https://redirect.github.com/eslint/eslint/issues/20394">#20394</a>)</li> <li><a href="https://github.com/eslint/eslint/commit/c43ce24ff0ce073ec4ad691cd5a50171dfe6cf1e"><code>c43ce24</code></a> chore: package.json update for <code>@eslint/js</code> release</li> <li><a href="https://github.com/eslint/eslint/commit/57058331946568164449c5caabe2cf206e4fb5d9"><code>5705833</code></a> fix: warn when <code>eslint-env</code> configuration comments are found (<a href="https://redirect.github.com/eslint/eslint/issues/20381">#20381</a>)</li> <li><a href="https://github.com/eslint/eslint/commit/506f1549a64aa65bdddc75c71cb62f0ab94b5a23"><code>506f154</code></a> build: add .scss files entry to knip (<a href="https://redirect.github.com/eslint/eslint/issues/20391">#20391</a>)</li> <li><a href="https://github.com/eslint/eslint/commit/4c9858e47bb9146cf20f546a562bc58a9ee3dae1"><code>4c9858e</code></a> ci: add <code>v9.x-dev</code> branch (<a href="https://redirect.github.com/eslint/eslint/issues/20382">#20382</a>)</li> <li><a href="https://github.com/eslint/eslint/commit/e2772811a8595d161870835ff04822b25a2cdf45"><code>e277281</code></a> 9.39.1</li> <li><a href="https://github.com/eslint/eslint/commit/4cdf397b30b2b749865ea0fcf4d30eb8ba458896"><code>4cdf397</code></a> Build: changelog update for 9.39.1</li> <li><a href="https://github.com/eslint/eslint/commit/92db329211c8da5ce8340a4d4c05ce9c12845381"><code>92db329</code></a> chore: update <code>@eslint/js</code> version to 9.39.1 (<a href="https://redirect.github.com/eslint/eslint/issues/20284">#20284</a>)</li> <li>Additional commits viewable in <a href="https://github.com/eslint/eslint/compare/v9.32.0...v9.39.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abdullah <125115953+mabdullahabaid@users.noreply.github.com>
360 lines
12 KiB
YAML
360 lines
12 KiB
YAML
name: CI Front and E2E
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
env:
|
|
STORYBOOK_BUILD_CACHE_KEY_FOR_RESTORE_ACTION: storybook-build-depot-ubuntu-24.04-8-runner
|
|
STORYBOOK_BUILD_CACHE_KEY_FOR_SAVE_ACTION: v3-storybook-build-depot-ubuntu-24.04-8-runner-${{ github.ref_name }}-${{ github.sha }}
|
|
|
|
jobs:
|
|
changed-files-check:
|
|
uses: ./.github/workflows/changed-files.yaml
|
|
with:
|
|
files: |
|
|
package.json
|
|
yarn.lock
|
|
packages/twenty-front/**
|
|
packages/twenty-ui/**
|
|
packages/twenty-shared/**
|
|
changed-files-check-e2e:
|
|
uses: ./.github/workflows/changed-files.yaml
|
|
with:
|
|
files: |
|
|
packages/**
|
|
playwright.config.ts
|
|
.github/workflows/ci-front.yaml
|
|
front-sb-build:
|
|
needs: changed-files-check
|
|
if: needs.changed-files-check.outputs.any_changed == 'true'
|
|
timeout-minutes: 30
|
|
runs-on: depot-ubuntu-24.04-8
|
|
env:
|
|
REACT_APP_SERVER_BASE_URL: http://localhost:3000
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.11.0
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- name: Fetch local actions
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/yarn-install
|
|
- name: Diagnostic disk space issue
|
|
run: df -h
|
|
- name: Front / Write .env
|
|
run: npx nx reset:env twenty-front
|
|
- name: Front / Clean storybook-static
|
|
run: rm -rf packages/twenty-front/storybook-static
|
|
- name: Front / Build storybook
|
|
run: npx nx storybook:build twenty-front
|
|
- name: Save storybook build cache
|
|
uses: ./.github/actions/save-cache
|
|
with:
|
|
key: ${{ env.STORYBOOK_BUILD_CACHE_KEY_FOR_SAVE_ACTION }}
|
|
front-sb-test:
|
|
timeout-minutes: 30
|
|
runs-on: depot-ubuntu-24.04-8
|
|
needs: front-sb-build
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [1, 2, 3, 4]
|
|
storybook_scope: [modules, pages, performance]
|
|
env:
|
|
SHARD_COUNTER: 4
|
|
REACT_APP_SERVER_BASE_URL: http://localhost:3000
|
|
steps:
|
|
- name: Fetch local actions
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/yarn-install
|
|
- name: Install Playwright
|
|
run: cd packages/twenty-front && npx playwright install
|
|
- name: Restore storybook build cache
|
|
uses: ./.github/actions/restore-cache
|
|
with:
|
|
key: ${{ env.STORYBOOK_BUILD_CACHE_KEY_FOR_RESTORE_ACTION }}
|
|
- name: Front / Write .env
|
|
run: npx nx reset:env twenty-front
|
|
- name: Run storybook tests
|
|
run: npx nx storybook:serve-and-test:static twenty-front --configuration=${{ matrix.storybook_scope }} --shard=${{ matrix.shard }}/${{ env.SHARD_COUNTER }} --checkCoverage=false
|
|
- name: Rename coverage file
|
|
run: mv packages/twenty-front/coverage/storybook/coverage-storybook.json packages/twenty-front/coverage/storybook/coverage-shard-${{matrix.shard}}.json
|
|
- name: Upload coverage artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
retention-days: 1
|
|
name: coverage-artifacts-${{ matrix.storybook_scope }}-${{ github.run_id }}-${{ matrix.shard }}
|
|
path: packages/twenty-front/coverage/storybook/coverage-shard-${{matrix.shard}}.json
|
|
merge-reports-and-check-coverage:
|
|
timeout-minutes: 30
|
|
runs-on: ubuntu-latest
|
|
needs: front-sb-test
|
|
env:
|
|
PATH_TO_COVERAGE: packages/twenty-front/coverage/storybook
|
|
strategy:
|
|
matrix:
|
|
storybook_scope: [modules, pages, performance]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/yarn-install
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: coverage-artifacts-${{ matrix.storybook_scope }}-${{ github.run_id }}-*
|
|
merge-multiple: true
|
|
path: coverage-artifacts
|
|
- name: Merge coverage reports
|
|
run: |
|
|
mkdir -p ${{ env.PATH_TO_COVERAGE }}
|
|
npx nyc merge coverage-artifacts ${{ env.PATH_TO_COVERAGE }}/coverage-storybook.json
|
|
- name: Checking coverage
|
|
run: npx nx storybook:coverage twenty-front --checkCoverage=true --configuration=${{ matrix.storybook_scope }}
|
|
front-chromatic-deployment:
|
|
timeout-minutes: 30
|
|
if: contains(github.event.pull_request.labels.*.name, 'run-chromatic') || github.event_name == 'push'
|
|
needs: front-sb-build
|
|
runs-on: depot-ubuntu-24.04-8
|
|
env:
|
|
REACT_APP_SERVER_BASE_URL: http://127.0.0.1:3000
|
|
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/yarn-install
|
|
- name: Restore storybook build cache
|
|
uses: ./.github/actions/restore-cache
|
|
with:
|
|
key: ${{ env.STORYBOOK_BUILD_CACHE_KEY }}
|
|
- name: Front / Write .env
|
|
run: |
|
|
cd packages/twenty-front
|
|
touch .env
|
|
echo "" >> .env
|
|
echo "REACT_APP_SERVER_BASE_URL=$REACT_APP_SERVER_BASE_URL" >> .env
|
|
- name: Publish to Chromatic
|
|
run: npx nx run twenty-front:chromatic:ci
|
|
front-task:
|
|
needs: changed-files-check
|
|
if: needs.changed-files-check.outputs.any_changed == 'true'
|
|
timeout-minutes: 30
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TASK_CACHE_KEY: front-task-${{ matrix.task }}
|
|
strategy:
|
|
matrix:
|
|
task: [lint, typecheck, test]
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.11.0
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- name: Fetch custom Github Actions and base branch history
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/yarn-install
|
|
- name: Restore ${{ matrix.task }} cache
|
|
id: restore-task-cache
|
|
uses: ./.github/actions/restore-cache
|
|
with:
|
|
key: ${{ env.TASK_CACHE_KEY }}
|
|
- name: Reset .env
|
|
uses: ./.github/actions/nx-affected
|
|
with:
|
|
tag: scope:frontend
|
|
tasks: reset:env
|
|
- name: Run ${{ matrix.task }} task
|
|
uses: ./.github/actions/nx-affected
|
|
with:
|
|
tag: scope:frontend
|
|
tasks: ${{ matrix.task }}
|
|
- name: Save ${{ matrix.task }} cache
|
|
uses: ./.github/actions/save-cache
|
|
with:
|
|
key: ${{ steps.restore-task-cache.outputs.cache-primary-key }}
|
|
front-build:
|
|
needs: changed-files-check
|
|
if: needs.changed-files-check.outputs.any_changed == 'true'
|
|
timeout-minutes: 30
|
|
runs-on: depot-ubuntu-24.04-8
|
|
env:
|
|
NODE_OPTIONS: "--max-old-space-size=10240"
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.11.0
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- name: Fetch custom Github Actions and base branch history
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/yarn-install
|
|
- name: Front / Write .env
|
|
run: npx nx reset:env twenty-front
|
|
- name: Build frontend
|
|
run: npx nx build twenty-front
|
|
- name: Upload frontend build artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: frontend-build
|
|
path: packages/twenty-front/build
|
|
retention-days: 1
|
|
e2e-test:
|
|
runs-on: ubuntu-latest
|
|
needs: [changed-files-check-e2e, front-build]
|
|
if: |
|
|
always() &&
|
|
needs.changed-files-check-e2e.outputs.any_changed == 'true' &&
|
|
(needs.front-build.result == 'success' || needs.front-build.result == 'skipped') &&
|
|
(github.event_name == 'push' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run-e2e')))
|
|
timeout-minutes: 30
|
|
env:
|
|
NODE_OPTIONS: "--max-old-space-size=10240"
|
|
services:
|
|
postgres:
|
|
image: twentycrm/twenty-postgres-spilo
|
|
env:
|
|
PGUSER_SUPERUSER: postgres
|
|
PGPASSWORD_SUPERUSER: postgres
|
|
ALLOW_NOSSL: "true"
|
|
SPILO_PROVIDER: "local"
|
|
ports:
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
redis:
|
|
image: redis
|
|
ports:
|
|
- 6379:6379
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
|
|
- name: Check system resources
|
|
run: |
|
|
echo "Available memory:"
|
|
free -h
|
|
echo "Available disk space:"
|
|
df -h
|
|
echo "CPU info:"
|
|
lscpu
|
|
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/yarn-install
|
|
|
|
- name: Build twenty-shared
|
|
run: npx nx build twenty-shared
|
|
|
|
- name: Install Playwright Browsers
|
|
run: npx nx setup twenty-e2e-testing
|
|
|
|
- name: Setup environment files
|
|
run: |
|
|
cp packages/twenty-front/.env.example packages/twenty-front/.env
|
|
npx nx reset:env:e2e-testing-server twenty-server
|
|
|
|
- name: Download frontend build artifact
|
|
if: needs.front-build.result == 'success'
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: frontend-build
|
|
path: packages/twenty-front/build
|
|
|
|
- name: Build frontend (if not available from front-build)
|
|
if: needs.front-build.result == 'skipped'
|
|
run: NODE_ENV=production NODE_OPTIONS="--max-old-space-size=10240" npx nx build twenty-front
|
|
|
|
- name: Build server
|
|
run: npx nx build twenty-server
|
|
|
|
- name: Create and setup database
|
|
run: |
|
|
PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d postgres -c 'CREATE DATABASE "default";'
|
|
PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d postgres -c 'CREATE DATABASE "test";'
|
|
npx nx run twenty-server:database:reset
|
|
|
|
- name: Start server
|
|
run: |
|
|
npx nx start twenty-server &
|
|
echo "Waiting for server to be ready..."
|
|
timeout 60 bash -c 'until curl -s http://localhost:3000/health; do sleep 2; done'
|
|
|
|
- name: Start frontend
|
|
run: |
|
|
npm_config_yes=true npx serve -s packages/twenty-front/build -l 3001 &
|
|
echo "Waiting for frontend to be ready..."
|
|
timeout 60 bash -c 'until curl -s http://localhost:3001; do sleep 2; done'
|
|
|
|
- name: Start worker
|
|
run: |
|
|
npx nx run twenty-server:worker &
|
|
echo "Worker started"
|
|
|
|
- name: Run Playwright tests
|
|
run: npx nx test twenty-e2e-testing
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: playwright-report
|
|
path: packages/twenty-e2e-testing/run_results/
|
|
retention-days: 30
|
|
|
|
ci-front-status-check:
|
|
if: always() && !cancelled()
|
|
timeout-minutes: 5
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
[
|
|
changed-files-check,
|
|
front-task,
|
|
front-build,
|
|
front-chromatic-deployment,
|
|
merge-reports-and-check-coverage,
|
|
front-sb-test,
|
|
front-sb-build,
|
|
]
|
|
steps:
|
|
- name: Fail job if any needs failed
|
|
if: contains(needs.*.result, 'failure')
|
|
run: exit 1
|
|
ci-e2e-status-check:
|
|
if: always() && !cancelled()
|
|
timeout-minutes: 5
|
|
runs-on: ubuntu-latest
|
|
needs: [changed-files-check-e2e, e2e-test]
|
|
steps:
|
|
- name: Fail job if any needs failed
|
|
if: contains(needs.*.result, 'failure')
|
|
run: exit 1
|