File: continuous-integration.yml

package info (click to toggle)
ts-node 10.9.2%2B~cs64.13.20-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,388 kB
  • sloc: javascript: 15,071; sh: 83; makefile: 15; xml: 9
file content (47 lines) | stat: -rw-r--r-- 1,194 bytes parent folder | download | duplicates (2)
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
name: Continuous Integration
on:
  # branches pushed by collaborators
  push:
    branches:
      - master
  # pull request from non-collaborators
  pull_request: {}
  # nightly
  schedule:
    - cron:  '0 0 * * *'
jobs:
  build:
    name: "Test: ${{ matrix.os }}, node ${{ matrix.node }}"
    runs-on: ${{ matrix.os }}-latest
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu, windows]
        node:
          - 18
          - 17
          - 16
          - 14
          - 12
    steps:
      # checkout code
      - uses: actions/checkout@v2
      # install node
      - name: Use Node.js ${{ matrix.os }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node }}

      # npm install with caching
      - run: |
          npm config set cache "$( node -p "process.cwd()" )/temp/npm-cache"
      - name: Cache dependencies
        uses: actions/cache@v2
        with:
          path: temp/npm-cache
          key: npm-cache-${{ matrix.os }} ${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
          # restore-keys: npm-cache-${{ matrix.os }} ${{ matrix.node }}-
      - run: npm install

      # Run tests
      - run: npm test