File: ci.yml

package info (click to toggle)
node-superagent 10.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,092 kB
  • sloc: javascript: 11,860; makefile: 77
file content (48 lines) | stat: -rw-r--r-- 1,300 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: CI
on: [push, pull_request]

env:
  SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
  SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}

permissions:
  contents: read #  to fetch code (actions/checkout)

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
       include:
        - node-version: 16.x
        - node-version: 18.x
        - node-version: 20.x
        - node-version: 22.x
    steps:
      - uses: actions/checkout@v4

      - name: Install Node - ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'npm'
      - name: Install dependencies
        run: npm ci
      - name: Build
        run: npm run build
      - name: Test On Node ${{ matrix.node-version }}
        env:
          BROWSER: ${{ matrix.test-on-brower }}
          HTTP2_TEST_DISABLED: ${{ matrix.http2-test-disabled }}
          OLD_NODE_TEST: ${{ matrix.test-on-old-node }}
        run: |
          if [ "$OLD_NODE_TEST" = "1" ]; then
            make test
          else
            npm run lint
            make test
          fi
      - name: Coverage On Node ${{ matrix.node-version }}
        run: npm run coverage
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v4