| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- name: CI
- on:
- push:
- branches: [ master, main ]
- pull_request:
- branches: [ master, main ]
- jobs:
- lint-and-test:
- runs-on: ubuntu-latest
-
- strategy:
- matrix:
- node-version: [18.x, 20.x, 22.x]
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v4
- with:
- node-version: ${{ matrix.node-version }}
- cache: 'npm'
-
- - name: Install dependencies
- run: npm ci
-
- - name: Run linter
- run: npm run lint
-
- - name: Run tests
- run: npm test
-
- - name: Upload coverage reports
- uses: codecov/codecov-action@v4
- if: matrix.node-version == '20.x'
- with:
- file: ./coverage/lcov.info
- flags: unittests
- name: codecov-umbrella
- fail_ci_if_error: false
-
- - name: Build
- run: npm run build
-
- - name: Test built executable
- run: |
- chmod +x build/index.js
- node build/index.js --version || true
|