ci: run tests before releasing #351
This file contains hidden or 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: | |
| workflow_call: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v5.0.0 | |
| with: | |
| node-version-file: ".node-version" | |
| - name: Install dependencies, run test coverage | |
| run: | | |
| npm ci | |
| npm install c8@10.1.3 | |
| npm run coverage | |
| - name: Coveralls | |
| if: github.ref == 'refs/heads/main' | |
| uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b #v2.3.6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |