Merge pull request #13 from michaeldzjap/fix/cjs-build #54
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] | |
jobs: | |
ci: | |
name: CI - OS ${{ matrix.os }}, Node.js ${{ matrix.node-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
node-version: [20.x, 21.x, 22.x] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Build | |
run: npm run prod | |
- name: Test | |
run: npm run test | |
- name: Upload coverage report | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x' }} | |
uses: codecov/codecov-action@v3 | |
- name: SonarCloud Scan | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x' }} | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |