Skip to content

Commit 490b67a

Browse files
committed
chore: migrate from travis to github-action
1 parent 610d4f0 commit 490b67a

File tree

2 files changed

+47
-16
lines changed

2 files changed

+47
-16
lines changed

.github/workflows/test.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, github-action, develop]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
if: "!contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
12+
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os:
18+
- ubuntu-latest
19+
# - macos-latest
20+
# - windows-latest
21+
node_version: [ 8.x, 10.x, 12.x, 13.x, 14.x, 15.x, 16.x, 18.x, 19.x, 20.x, 21.x, 22.x ]
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Use Node.js ${{ matrix.node_version }}
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: ${{ matrix.node_version }}
29+
30+
- name: Restore packages
31+
uses: actions/cache@v2
32+
with:
33+
path: |
34+
node_modules
35+
*/*/node_modules
36+
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
37+
38+
- name: Install dependencies and run tests with coverage
39+
run: |
40+
yarn install
41+
yarn test:coverage
42+
43+
- name: Upload coverage to Codecov
44+
uses: codecov/[email protected]
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
flags: ${{ runner.os }}

.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)