Node.js versions update #141
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 Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
name: Building [Node v${{ matrix.node-version }} & Cypress v${{ matrix.cypress-version }}] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
cypress-version: [4.x, 5.x, 6.x, 7.x, 8.x, 9.x, 10.x, 11.x, 12.x, 13.x] | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Running tests | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cypress-version: ${{ matrix.cypress-version }} | |
- run: yarn --frozen-lockfile | |
- run: yarn add cypress@${{ matrix.cypress-version }} | |
- run: yarn test | |
sonarcloud: | |
name: Building (with Codacy & SonarCloud) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Running Tests | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- run: yarn | |
- run: yarn add [email protected] | |
- run: yarn test:c | |
- name: Upload Jest tests HTML report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Tests HTML Report | |
path: ./dist/reports/jest/jest-report.html | |
- name: Deploy Jest tests HTML report | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist/reports/jest | |
- name: Upload tests coverage HTML report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Code Coverage HTML Report | |
path: ./dist/reports/coverage | |
- name: Deploy test coverage HTML report | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist/reports/coverage | |
- name: Report code coverage | |
uses: zgosalvez/github-actions-report-lcov@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
artifact-name: Code Coverage Report | |
coverage-files: ./dist/reports/coverage/lcov.info | |
- name: Run Codacy Coverage Reporter | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: ./dist/reports/coverage/lcov.info | |
- name: 'ESLint Checks' | |
continue-on-error: true | |
run: yarn lint | |