Skip to content

feat(nx-cloud): setup nx workspace #2

feat(nx-cloud): setup nx workspace

feat(nx-cloud): setup nx workspace #2

Workflow file for this run

name: affected-lint
on:
pull_request:
push:
branches:
- dev
- main
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: false
jobs:
main:
runs-on: ubuntu-20.04
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/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: yarn install --frozen-lockfile
- run: yarn format:check
- run: yarn nx affected --target=lint --parallel --max-parallel=3
pr:
runs-on: ubuntu-20.04
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v3
name: Checkout pr
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: yarn install --frozen-lockfile
- run: yarn format:check
- run: yarn nx affected --target=lint --parallel --max-parallel=3