aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: 76dea5b1f83ccaf69bc53e86ba8e6994d893dce4 (about) (plain)
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
name: CI
on: [ push, pull_request ]
jobs:
  test:
    strategy:
      matrix:
        node: [ "0.8", "0.10", "0.12", "4", "6", "8", "10", "12", latest ]
        os: [ ubuntu-latest, windows-latest ]
        script: [ compress, mocha, release/benchmark, release/jetstream ]
        exclude:
          - node: "0.8"
            script: release/jetstream
    name: ${{ matrix.node }} ${{ matrix.os }} ${{ matrix.script }}
    runs-on: ${{ matrix.os }}
    env:
      NODE: ${{ matrix.node }}
      TYPE: ${{ matrix.script }}
    steps:
      - uses: actions/checkout@v1
      - uses: actions/cache@v1
        with:
          path: tmp
          key: tmp ${{ matrix.script }}
      - name: Perform tests
        shell: bash
        run: |
          git clone --branch v1.5.4 --depth 1 https://github.com/jasongin/nvs.git ~/.nvs
          while ! timeout 60 bash -c '. ~/.nvs/nvs.sh add $NODE && nvs use $NODE'; do
            cd ~/.nvs
            git clean -xdf
            cd -
          done
          . ~/.nvs/nvs.sh --version
          nvs use $NODE
          node --version
          npm config set audit false
          npm config set optional false
          npm config set save false
          npm config set strict-ssl false
          npm config set update-notifier false
          npm --version
          while !(npm install); do echo "'npm install' failed - retrying..."; done
          node test/$TYPE