chore(deps): update pnpm to v10.5.2 (#931) #969
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- 'v*' # exclude version tags | |
name: 🚀 Merge main | |
concurrency: merge_main | |
permissions: | |
id-token: write # this is required for AWS https://github.com/aws-actions/configure-aws-credentials#usage | |
contents: read # this is required for Nx https://github.com/nrwl/nx-set-shas#permissions-in-v2 | |
actions: read # this is required for Nx https://github.com/nrwl/nx-set-shas#permissions-in-v2 | |
env: | |
CI: true | |
AWS_REGION: eu-west-1 | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-and-test: | |
name: 🏗 Build Project, 🧪 Run Tests & 🚀 Deploy staging | |
runs-on: ubuntu-latest | |
environment: staging | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# We need to fetch all branches and commits so that Nx affected has a base to compare against. | |
fetch-depth: 0 | |
- name: Setup Nx SHAs | |
uses: nrwl/nx-set-shas@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4.1.0 | |
- name: Setup Node.js | |
id: setup-node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: 💾 Cache Nx cache | |
id: package-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
nx-cache | |
# Cache will be updated at every run: https://github.com/actions/cache/blob/main/workarounds.md#update-a-cache | |
key: ${{ runner.os }}-nx-cache-${{ steps.setup-node.outputs.node-version }}-${{ github.run_id }} | |
- name: '🏗 Package' | |
run: pnpm nx affected --targets=package,build --parallel=2 | |
- name: '🧪 Run tests' | |
run: pnpm nx affected --targets=test-linter,test-type,test-unit,test-circular,test-cdk --parallel=2 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: ${{ env.AWS_REGION }} | |
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE_STAGING }} | |
- name: '🚀 Deploy staging' | |
run: pnpm nx affected --target=deploy-staging --parallel=2 | |
- name: '🔎 Run integration tests on staging' | |
run: SLS_ENV=staging pnpm nx affected --target=test-integration --parallel=2 | |
- name: '🧹 Clean Unused CDK assets' | |
run: pnpm nx affected --target=cdk-gc |