update CI workflow

This commit is contained in:
Amruth Pillai
2025-01-11 15:59:36 +01:00
parent 198c269790
commit 1c36ac1d68
3 changed files with 19 additions and 26 deletions

View File

@ -13,39 +13,32 @@ on:
branches:
- main
permissions:
actions: read
contents: read
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 2
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v3.0.0
- name: Setup Node.js
uses: actions/setup-node@v4.0.2
- uses: pnpm/action-setup@v4.0.0
with:
version: 9
- run: pnpm dlx nx-cloud start-ci-run --distribute-on="4 linux-medium-js" --stop-agents-after="build"
- uses: actions/setup-node@v4.1.0
with:
node-version: 22
cache: "pnpm"
node-version: 20.17.0
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- uses: nrwl/nx-set-shas@v4.1.2
- name: Format
run: pnpm format:check
- name: Test
run: pnpm test
- name: Build
run: pnpm build
env:
NODE_ENV: production
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- run: pnpm exec nx affected -t lint format:check test build