feat: fine grained storage persister #2559
Workflow file for this run
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
name: pr | |
on: [pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
NX_CLOUD_DISTRIBUTED_EXECUTION: true | |
NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: 3 | |
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | |
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }} | |
jobs: | |
main: | |
name: Nx Cloud - Main Job | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2.2.4 | |
with: | |
version: 8 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Install dependencies | |
run: pnpm --filter "./packages/**" --filter query --prefer-offline install | |
- name: Get appropriate base and head commits for `nx affected` commands | |
uses: nrwl/nx-set-shas@v3 | |
with: | |
main-branch-name: 'beta' | |
- run: | | |
echo "BASE: ${{ env.NX_BASE }}" | |
echo "HEAD: ${{ env.NX_HEAD }}" | |
- name: Start CI Orchestrator | |
run: npx nx-cloud start-ci-run | |
- name: Run Tests | |
uses: nick-fields/retry@v2.8.3 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: npx nx affected --targets=test:eslint,test:lib,test:types,test:build,test:bundle | |
- name: Stop Agents | |
run: npx nx-cloud stop-all-agents | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
agents: | |
name: Nx Cloud - Agents | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
agent: [1, 2, 3] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2.2.4 | |
with: | |
version: 8 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Install dependencies | |
run: pnpm --filter "./packages/**" --filter query --prefer-offline install | |
- name: Start Nx Agent ${{ matrix.agent }} | |
run: npx nx-cloud start-agent | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2.2.4 | |
with: | |
version: 8 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Install dependencies | |
run: pnpm --filter "./packages/**" --filter query --prefer-offline install | |
- name: Run prettier | |
run: pnpm run test:format |