Bugfix: updates #191
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: pr-check | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
push: | |
branches: | |
- 'main' | |
jobs: | |
Check: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
node-version: [20.x, 18.x, 16.x, 15.x, 14.x, 12.x] | |
steps: | |
- name: Begin Check... | |
uses: actions/checkout@v2 | |
- name: Use NodeJS ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Use cached node_modules | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: nodeModules-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
nodeModules- | |
- name: install clipboard tools | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt update && sudo apt install xsel xvfb -y | |
- name: 🏘️ Install dependencies | |
run: npm ci | |
env: | |
CI: true | |
- name: 🐛 Linter 🕵️ | |
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '15.x' | |
run: npm run linter | |
- name: 🐛 Test on Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: xvfb-run npm run test:coverage | |
- name: 🐛 Test on other os | |
if: matrix.os != 'ubuntu-latest' | |
run: npm test | |
- name: publish code coverage on CodeClimate | |
if: matrix.os == 'ubuntu-latest' | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: 7224dfa80ac316eaffa0c0d753c472d455d995ac1a10dd2ff66462ad48b70577 | |
- name: publish code coverage on Coveralls | |
if: matrix.os == 'ubuntu-latest' | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |