Repository navigation
build(deps): bump morgan from 1.11.0 to 1.12.1 #23
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: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| unit: | |
| 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: "yarn" | |
| - run: yarn install --frozen-lockfile | |
| - run: yarn build | |
| - name: Unit tests + coverage | |
| run: yarn test:unit | |
| - name: Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: ./coverage/lcov.info | |
| parallel: true | |
| integration: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "yarn" | |
| - run: yarn install --frozen-lockfile | |
| - run: yarn build | |
| - name: Start json-server | |
| run: | | |
| npx json-server --watch test/data/db.json --port 3000 & | |
| sleep 2 | |
| - name: Integration tests | |
| run: node_modules/.bin/mocha test/index.js --timeout 30000 | |
| - name: Coverage report (unit + integration) | |
| run: npx nyc report --reporter=lcov --reporter=text | |
| - name: Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: ./coverage/lcov.info | |
| parallel: true | |
| finish: | |
| needs: integration | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Coveralls finished | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| parallel-finished: true | |
| publish: | |
| needs: [unit, integration] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| registry-url: "https://registry.npmjs.org" | |
| - run: yarn install --frozen-lockfile | |
| - run: yarn build | |
| - name: Check package existence | |
| run: npm view fetch-plugin | |
| - name: Debug npm auth | |
| run: npm whoami || true | |
| - name: Publish to npm | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |