Release/v4.0.1 #356
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: Run CI | |
on: | |
# push: | |
# branches-ignore: | |
# - develop | |
# - release/** | |
# paths-ignore: | |
# - '**/*.md' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
sonar: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
token: ${{ secrets.NPM_TOKEN }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v3.0.0 | |
- name: Install | |
run: | | |
pnpm whoami | |
pnpm i | |
- name: Compile | |
run: pnpm -r run compile | |
- name: Clean coverage report | |
run: pnpm run coverage:clean | |
- name: Generate coverage report | |
uses: GabrielBB/xvfb-action@v1 | |
env: | |
NODE_OPTIONS: "--max-old-space-size=8192" | |
with: | |
run: pnpm run coverage | |
- name: Send results to SonarCloud | |
uses: SonarSource/sonarcloud-github-action@v2.1.1 | |
with: | |
projectBaseDir: core/nut.js | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
test: | |
needs: | |
- sonar | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
strategy: | |
matrix: | |
os: [ windows-latest, macos-latest ] | |
node: [ 18 ] | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{matrix.node}} | |
registry-url: https://registry.npmjs.org/ | |
token: ${{ secrets.NPM_TOKEN }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v3.0.0 | |
- name: Install | |
run: pnpm i | |
- name: Compile | |
run: pnpm run compile | |
- name: Generate coverage report | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: | | |
pnpm run coverage |