File: test.yml

package info (click to toggle)
node-rewire 6.0.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 416 kB
  • sloc: javascript: 1,387; makefile: 2
file content (47 lines) | stat: -rw-r--r-- 1,529 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: ๐Ÿงช Test

on:
  push:
    branches:
      - "master"
  pull_request: {}

jobs:
  test:
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[skip ci]')"

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x, 16.x]

    steps:
      - name: ๐Ÿ›‘ Cancel Previous Runs
        uses: styfle/cancel-workflow-action@a40b8845c0683271d9f53dfcb887a7e181d3918b # pin@0.9.1
      - name: โฌ‡๏ธ Checkout repo
        uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # pin@v2
      - name: โŽ” Setup node ${{ matrix.node-version }}
        uses: actions/setup-node@25316bbc1f10ac9d8798711f44914b1cf3c4e954 # pin@v2
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"
      - name: ๐Ÿ—„ Cache node_modules
        id: cache-node_modules
        uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # pin@v2
        with:
          path: "**/node_modules"
          key: node_modules-${{ runner.os }}-node-${{ matrix.node-version }}-${{
            hashFiles('**/package-lock.json') }}
      - name: ๐Ÿ“ฅ Install dependencies
        if: steps.cache-node_modules.outputs.cache-hit != 'true'
        run: |
          npm ci --ignore-scripts
      - name: ๐Ÿงช Test
        run: |
          npm test
        env:
          CI: true
      - name: โฌ†๏ธ Upload coverage report
        uses: coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057 # pin@1.1.3
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}