Skip to content

Commit 4830998

Browse files
committed
ci: use github actions
1 parent 468e756 commit 4830998

File tree

2 files changed

+45
-26
lines changed

2 files changed

+45
-26
lines changed

.circleci/config.yml

-26
This file was deleted.

.github/workflows/test.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [14.x, 16.x]
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
21+
- name: Cache node modules
22+
uses: actions/cache@v2
23+
env:
24+
cache-name: cache-node-modules
25+
with:
26+
path: ~/.npm
27+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-build-${{ env.cache-name }}-
30+
${{ runner.os }}-build-
31+
${{ runner.os }}-
32+
33+
- name: Install dependencies
34+
run: yarn
35+
36+
- name: Run linter
37+
run: npm run lint
38+
39+
- name: Run test with coverage
40+
run: npm run coverage
41+
42+
- name: Coveralls
43+
uses: coverallsapp/github-action@master
44+
with:
45+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)