Update npm: ESLint (major) - autoclosed #660
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: CI | |
on: | |
push: | |
branches: | |
- renovate/* | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_call: | |
inputs: | |
version: | |
description: The version to set in the package.json files | |
default: "0.0.0" | |
required: false | |
type: string | |
branch_name: | |
description: The name of the branch | |
required: true | |
type: string | |
env: | |
NODE_VERSION: 18 | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
with: | |
ref: ${{ inputs.branch_name }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Run ESLint | |
run: npx nx run-many --target lint --max-warnings 0 | |
- name: Run Prettier | |
run: npx prettier --check . | |
- name: Run CSpell | |
run: npx cspell "**/*.*" | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
with: | |
ref: ${{ inputs.branch_name }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Log Version | |
run: Write-Host ${{ inputs.version }} | |
- name: Set Version | |
if: inputs.version != '' | |
run: npx nx run-many --target version --args="--version=${{ inputs.version }}" | |
- name: Build | |
run: npx nx run-many --target build | |
- name: Upload Build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Build | |
path: ./dist | |
retention-days: 1 | |
test: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
with: | |
ref: ${{ inputs.branch_name }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Run Unit Tests | |
run: npx nx run-many --target test --configuration ci | |
- name: Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
licenses: | |
name: Check Licenses | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
with: | |
ref: ${{ inputs.branch_name }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Download Build | |
uses: actions/download-artifact@v3 | |
with: | |
name: Build | |
path: ./dist | |
- name: Check licenses | |
run: npm exec ./dist/packages/license-cop | |
e2e: | |
name: E2E Test | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
with: | |
ref: ${{ inputs.branch_name }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Download Build | |
uses: actions/download-artifact@v3 | |
with: | |
name: Build | |
path: ./dist | |
- name: Run E2E Tests | |
run: npx nx run-many --target e2e --configuration ci |