Improve node tests workflow

This commit is contained in:
Shivam Mathur
2022-02-10 06:47:30 +05:30
parent 24eb15e5fa
commit 9c9aa7fd23

View File

@@ -3,10 +3,16 @@ on: [push, pull_request]
jobs: jobs:
run: run:
name: Run name: Run
runs-on: ubuntu-latest runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Setup Node.js 16.x - name: Setup Node.js 16.x
uses: actions/setup-node@v2 uses: actions/setup-node@v2
@@ -22,10 +28,14 @@ jobs:
- name: ESLint Check - name: ESLint Check
run: npm run lint run: npm run lint
- name: Run tests - name: Run npm audit
run: npm test run: npm audit
- name: Send Coverage - name: Send Coverage
continue-on-error: true uses: codecov/codecov-action@v2
timeout-minutes: 1 with:
run: curl -s https://codecov.io/bash | bash -s -- -t ${{secrets.CODECOV_TOKEN}} -f coverage/clover.xml -n github-actions-codecov-${{ matrix.operating-system }}-php${{ matrix.php-versions }} token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/lcov.info
name: github-actions-codecov-${{ matrix.operating-system }}
fail_ci_if_error: false
verbose: true