Skip to content

build: drop workspace.json #83

build: drop workspace.json

build: drop workspace.json #83

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
#env:
# NX_CLOUD_DISTRIBUTED_EXECUTION: true
jobs:
main:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- uses: actions/checkout@v3
name: Checkout [main]
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
- uses: actions/setup-node@v3
with:
node-version: '16.16.0'
cache: npm
# - name: Cache npm modules
# uses: actions/cache@v2
# with:
# path: ~/.npm-store
# key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-
- run: npm install --frozen-lockfile
- run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD --verbose
# - run: pnpx nx-cloud start-ci-run
- run: npx nx affected --target=build --parallel --max-parallel=3
- run: npx nx affected --target=lint --parallel --max-parallel=3
- run: npx nx affected --target=test --parallel --max-parallel=2
# - run: pnpx nx-cloud stop-all-agents
pr:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v3
name: Checkout [main]
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
- uses: actions/setup-node@v3
with:
node-version: '16.16.0'
cache: npm
# - name: Cache npm modules
# uses: actions/cache@v2
# with:
# path: ~/.pnpm-store
# key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-
# - uses: pnpm/[email protected]
# with:
# version: 6.24.3
# run_install: |
# - recursive: false
# args: [--frozen-lockfile]
- run: npm install --frozen-lockfile
- run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD --verbose
# - run: pnpx nx-cloud start-ci-run
- run: npx nx affected --target=build --parallel --max-parallel=3
- run: npx nx affected --target=lint --parallel --max-parallel=3
- run: npx nx affected --target=test --parallel --max-parallel=2
# - run: pnpx nx-cloud stop-all-agents
# agents:
# runs-on: ubuntu-latest
# name: Agent 1
# strategy:
# matrix:
# agent: [ 1, 2, 3 ]
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: '14'
# - name: Cache npm modules
# uses: actions/cache@v2
# with:
# path: ~/.pnpm-store
# key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-
#
# - uses: pnpm/[email protected]
# with:
# version: 6.24.3
# run_install: |
# - recursive: false
# args: [--frozen-lockfile]
# - name: Start Nx Agent ${{ matrix.agent }}
# run: npx nx-cloud start-agent