Use rollup-plugin-typescript2 for TS transpilation (#143)
[poolifier.git] / .github / workflows / ci.yml
CommitLineData
ac0fc89e
S
1name: CI
2
3on:
4 push:
5 branches:
6 - master
7 pull_request:
253f3064
S
8 workflow_dispatch:
9 inputs:
10 withBenchmark:
11 description: 'With Benchmark?'
12 default: false
ac0fc89e
S
13
14jobs:
15 build:
16 runs-on: ubuntu-latest
17
18 strategy:
19 matrix:
20 node-version: [12.x, 14.x]
21
22 steps:
23 - name: Checkout
24 uses: actions/checkout@v2
25
26 - name: Set node version to ${{ matrix.node-version }}
27 uses: actions/setup-node@v1
28 with:
29 node-version: ${{ matrix.node-version }}
30
31 - name: Install
32 run: npm ci
33
34 - name: Build
35 run: npm run build --if-present
36
777b7824
S
37 - name: Lint
38 run: npm run lint
39
ac0fc89e
S
40 - name: Test
41 if: github.ref != 'refs/heads/master'
42 run: npm run test
43
44 - name: Test & Coverage
45 if: github.ref == 'refs/heads/master'
777b7824 46 run: |
ac0fc89e
S
47 npm run test
48 export COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
49 npm run coverage
50 env:
51 CI: true
253f3064
S
52
53 - name: Benchmark
54 if: github.event.inputs.withBenchmark
55 run: npm run benchmark