summaryrefslogtreecommitdiff
path: root/desktop/node_modules/sumchecker/.github/workflows/ci.yml
blob: 73e955ade1dd12a46183e35e0952cc611e0123cc (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
44
45
46
47
name: CI

on:
  push:
    branches:
      - master
    tags:
      - v[0-9]+.[0-9]+.[0-9]+*
  pull_request:

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [windows-latest, macOS-latest, ubuntu-latest]
        node-version: [8.x, 10.x, 12.x]

    steps:
      - name: Fix git checkout line endings
        run: git config --global core.autocrlf input
      - uses: actions/checkout@v1
      - name: Setup Node.js
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: Cache node_modules
        uses: actions/cache@v1
        with:
          path: node_modules
          key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}
          restore-keys: |
            ${{ runner.OS }}-build-${{ env.cache-name }}-
            ${{ runner.OS }}-build-
            ${{ runner.OS }}-
      - name: Install
        run: npm install
      - name: Lint
        run: npm run lint
      - name: Testsuite
        run: npm run coverage
      - name: Test TypeScript definition
        run: npm run tsd
      - name: Codecov
        run: npm run codecov
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}