Skip to content

chore(workflows): post mock diff md comment for demo purposes #2813

chore(workflows): post mock diff md comment for demo purposes

chore(workflows): post mock diff md comment for demo purposes #2813

Workflow file for this run

name: CI
on: push
env:
NX_NON_NATIVE_HASHER: true
jobs:
audit:
runs-on: ubuntu-latest
name: Audit
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Audit production dependencies
run: npm audit --omit=dev --omit=optional
format:
runs-on: ubuntu-latest
name: Format check
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Set base and head for Nx affected commands
uses: nrwl/nx-set-shas@v4
- name: Install dependencies
run: npm ci
- name: Check formatting of affected files
run: npx nx format:check
lint:
runs-on: ubuntu-latest
name: Linter
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Set base and head for Nx affected commands
uses: nrwl/nx-set-shas@v4
- name: Install dependencies
run: npm ci
- name: Lint affected projects
run: npx nx affected:lint --parallel=3
unit-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
name: Unit tests
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Set base and head for Nx affected commands
uses: nrwl/nx-set-shas@v4
- name: Install dependencies
run: npm ci
- name: Unit test affected projects
run: npx nx affected -t unit-test --parallel=3 --coverage.enabled
integration-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
name: Integration tests
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Set base and head for Nx affected commands
uses: nrwl/nx-set-shas@v4
- name: Install dependencies
run: npm ci
- name: Integration test affected projects
run: npx nx affected -t integration-test --parallel=3 --coverage.enabled
e2e:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
name: E2E tests
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Set base and head for Nx affected commands
uses: nrwl/nx-set-shas@v4
- name: Install dependencies
run: npm ci
- name: E2E test affected projects
run: npx nx affected:e2e --parallel=3
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Set base and head for Nx affected commands
uses: nrwl/nx-set-shas@v4
- name: Install dependencies
run: npm ci
- name: Build affected projects
run: npx nx affected:build --parallel=3
code-pushup:
runs-on: ubuntu-latest
name: Code PushUp
env:
CP_SERVER: ${{ secrets.CP_SERVER }}
CP_API_KEY: ${{ secrets.CP_API_KEY }}
CP_ORGANIZATION: code-pushup
CP_PROJECT: cli
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
- name: Collect Code PushUp report
run: npx nx run-collect
- name: Upload Code PushUp report to portal
run: npx nx run-upload
- name: Save report files as workflow artifact
uses: actions/upload-artifact@v4
with:
name: code-pushup-report
path: .code-pushup/