[CI] Migrate to ubuntu 24.04 runners (#9607)
## Introduction Our GitHub Runners provider just [released](https://depot.dev/changelog/2024-07-12-ubuntu-24-04-github-actions-runner-beta) ubuntu-24.04 runners lately ## Cache primary key factorization Refactored the calculation of the cache-primary-key prefix to avoid duplication ## Runs - twenty-front lint https://github.com/twentyhq/twenty/actions/runs/12770312293/job/35595272862 - twenty-server https://github.com/twentyhq/twenty/actions/runs/12770218595
This commit is contained in:
@ -16,12 +16,17 @@ outputs:
|
|||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
|
- name: Cache primary key builder
|
||||||
|
id: cache-primary-key-builder
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "CACHE_PRIMARY_KEY_PREFIX=${{ inputs.key }}-${{ github.ref_name }}" >> "${GITHUB_OUTPUT}"
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
id: restore-cache
|
id: restore-cache
|
||||||
with:
|
with:
|
||||||
key: ${{ inputs.key }}-${{ github.ref_name }}-${{ github.sha }}
|
key: ${{ steps.cache-primary-key-builder.outputs.CACHE_PRIMARY_KEY_PREFIX }}-${{ github.sha }}
|
||||||
restore-keys: ${{ inputs.key }}-${{ github.ref_name }}-
|
restore-keys: ${{ steps.cache-primary-key-builder.outputs.CACHE_PRIMARY_KEY_PREFIX }}-
|
||||||
path: |
|
path: |
|
||||||
.cache
|
.cache
|
||||||
.nx/cache
|
.nx/cache
|
||||||
|
|||||||
12
.github/workflows/ci-front.yaml
vendored
12
.github/workflows/ci-front.yaml
vendored
@ -11,12 +11,12 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
STORYBOOK_BUILD_CACHE_KEY: storybook-build-depot-ubuntu-22.04-8-runner
|
STORYBOOK_BUILD_CACHE_KEY: storybook-build-depot-ubuntu-24.04-8-runner
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
front-sb-build:
|
front-sb-build:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: depot-ubuntu-22.04-8
|
runs-on: depot-ubuntu-24.04-8
|
||||||
env:
|
env:
|
||||||
REACT_APP_SERVER_BASE_URL: http://localhost:3000
|
REACT_APP_SERVER_BASE_URL: http://localhost:3000
|
||||||
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
|
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
|
||||||
@ -67,7 +67,7 @@ jobs:
|
|||||||
key: ${{ steps.restore-storybook-build-cache.outputs.cache-primary-key }}
|
key: ${{ steps.restore-storybook-build-cache.outputs.cache-primary-key }}
|
||||||
front-sb-test:
|
front-sb-test:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: depot-ubuntu-22.04-8
|
runs-on: depot-ubuntu-24.04-8
|
||||||
needs: front-sb-build
|
needs: front-sb-build
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -122,7 +122,7 @@ jobs:
|
|||||||
path: packages/twenty-front/coverage/storybook/coverage-shard-${{matrix.shard}}.json
|
path: packages/twenty-front/coverage/storybook/coverage-shard-${{matrix.shard}}.json
|
||||||
merge-reports-and-check-coverage:
|
merge-reports-and-check-coverage:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: depot-ubuntu-22.04-8
|
runs-on: depot-ubuntu-24.04-8
|
||||||
needs: front-sb-test
|
needs: front-sb-test
|
||||||
env:
|
env:
|
||||||
PATH_TO_COVERAGE: packages/twenty-front/coverage/storybook
|
PATH_TO_COVERAGE: packages/twenty-front/coverage/storybook
|
||||||
@ -163,7 +163,7 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
if: contains(github.event.pull_request.labels.*.name, 'run-chromatic') || github.event_name == 'push'
|
if: contains(github.event.pull_request.labels.*.name, 'run-chromatic') || github.event_name == 'push'
|
||||||
needs: front-sb-build
|
needs: front-sb-build
|
||||||
runs-on: depot-ubuntu-22.04-8
|
runs-on: depot-ubuntu-24.04-8
|
||||||
env:
|
env:
|
||||||
REACT_APP_SERVER_BASE_URL: http://127.0.0.1:3000
|
REACT_APP_SERVER_BASE_URL: http://127.0.0.1:3000
|
||||||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
||||||
@ -203,7 +203,7 @@ jobs:
|
|||||||
run: npx nx run twenty-front:chromatic:ci
|
run: npx nx run twenty-front:chromatic:ci
|
||||||
front-task:
|
front-task:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: depot-ubuntu-22.04-8
|
runs-on: depot-ubuntu-24.04-8
|
||||||
env:
|
env:
|
||||||
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
|
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
|
||||||
TASK_CACHE_KEY: front-task-${{ matrix.task }}
|
TASK_CACHE_KEY: front-task-${{ matrix.task }}
|
||||||
|
|||||||
6
.github/workflows/ci-server.yaml
vendored
6
.github/workflows/ci-server.yaml
vendored
@ -16,7 +16,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
server-setup:
|
server-setup:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-latest
|
runs-on: depot-ubuntu-24.04-8
|
||||||
env:
|
env:
|
||||||
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
|
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
|
||||||
services:
|
services:
|
||||||
@ -115,7 +115,7 @@ jobs:
|
|||||||
|
|
||||||
server-test:
|
server-test:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-latest
|
runs-on: depot-ubuntu-24.04-8
|
||||||
needs: server-setup
|
needs: server-setup
|
||||||
env:
|
env:
|
||||||
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
|
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
|
||||||
@ -152,7 +152,7 @@ jobs:
|
|||||||
|
|
||||||
server-integration-test:
|
server-integration-test:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-latest
|
runs-on: depot-ubuntu-24.04-8
|
||||||
needs: server-setup
|
needs: server-setup
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
|
|||||||
Reference in New Issue
Block a user