mirror of
https://github.com/bitwarden/browser
synced 2026-01-31 08:43:54 +00:00
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: Experimental Nx CI
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
nx-experiment:
|
|
name: Run Nx Affected Tasks
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Get Node Version
|
|
id: retrieve-node-version
|
|
working-directory: ./
|
|
run: |
|
|
NODE_NVMRC=$(cat .nvmrc)
|
|
NODE_VERSION=${NODE_NVMRC/v/''}
|
|
echo "node_version=$NODE_VERSION" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
|
with:
|
|
version: 10
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
|
with:
|
|
cache: 'pnpm'
|
|
cache-dependency-path: '**/pnpm-lock.yaml'
|
|
node-version: ${{ env._NODE_VERSION }}
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Set Nx SHAs for affected detection
|
|
uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
|
|
|
|
- name: Run Nx affected tasks
|
|
continue-on-error: true
|
|
run: npx nx affected -t build lint test |