From 0cf1928de5576005e96e5e839d47e7e5dc4a0ddf Mon Sep 17 00:00:00 2001 From: Martin Domajnko <35891136+martines3000@users.noreply.github.com> Date: Tue, 26 Mar 2024 13:19:12 +0100 Subject: [PATCH] chore: update ci (#612) --- .github/workflows/ci.yml | 40 ++++++++++++++++---------------------- .github/workflows/cron.yml | 38 ++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72023e283..d685c40da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,26 +11,20 @@ on: jobs: main: - name: Nx Cloud - Main Job - uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.14.0 - secrets: - NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - with: - pnpm-version: 8.11.0 - node-version: 20.10.0 - number-of-agents: 4 - main-branch-name: 'develop' - parallel-commands-on-agents: | - pnpm exec nx run-many --target=lint --parallel=4 - pnpm exec nx run-many --target=test:ci --parallel=4 - pnpm exec nx run-many --target=build --parallel=4 - - agents: - name: Nx Cloud - Agents - uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.14.0 - secrets: - NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - with: - number-of-agents: 4 - pnpm-version: 8.11.0 - node-version: 20.10.0 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + - name: Install node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + registry-url: https://registry.npmjs.org/ + cache: 'pnpm' + - name: Set up nx-cloud + run: npx nx-cloud start-ci-run --distribute-on="4 linux-medium-js" + - name: Install dependencies + run: pnpm install --frozen-lockfile + - run: pnpm nx run-many --target=build,lint,test:ci diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index dd0484304..160c556e4 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -7,24 +7,20 @@ on: jobs: main: - name: Nx Cloud - Cron Job - uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.14.0 - secrets: - NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - with: - pnpm-version: 8.11.0 - node-version: 20.10.0 - number-of-agents: 2 - main-branch-name: 'develop' - parallel-commands-on-agents: | - pnpm exec nx run-many --target=test:cron --parallel=2 - - agents: - name: Nx Cloud - Agents - uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.14.0 - secrets: - NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - with: - number-of-agents: 2 - pnpm-version: 8.11.0 - node-version: 20.10.0 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + - name: Install node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + registry-url: https://registry.npmjs.org/ + cache: 'pnpm' + - name: Set up nx-cloud + run: npx nx-cloud start-ci-run --distribute-on="4 linux-medium-js" --stop-agents-after="test:ci" + - name: Install dependencies + run: pnpm install --frozen-lockfile + - run: pnpm nx run-many --target=test:cron