Skip to content

Commit 44d08fd

Browse files
committed
Move from travis to github actions for CI
1 parent 802aeec commit 44d08fd

File tree

2 files changed

+51
-19
lines changed

2 files changed

+51
-19
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
env:
10+
NODE_VERSION: '12.x'
11+
12+
jobs:
13+
test:
14+
name: Tests
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 1
21+
22+
- uses: actions/setup-node@v2-beta
23+
with:
24+
node-version: '${{ env.NODE_VERSION }}'
25+
26+
- name: Get package manager's global cache path
27+
id: global-cache-dir-path
28+
run: echo "::set-output name=dir::$(yarn cache dir)"
29+
30+
- name: Cache package manager's global cache and node_modules
31+
id: cache-dependencies
32+
uses: actions/cache@v2
33+
with:
34+
path: |
35+
${{ steps.global-cache-dir-path.outputs.dir }}
36+
node_modules
37+
key: v1-${{ runner.os }}-${{ matrix.node-version }}-${{
38+
hashFiles('**/yarn.lock'
39+
) }}
40+
restore-keys: |
41+
v1-${{ runner.os }}-${{ matrix.node-version }}-
42+
43+
- name: Install Dependencies
44+
run: yarn install --no-lockfile
45+
if: |
46+
steps.cache-dependencies.outputs.cache-hit != 'true'
47+
48+
- name: Test
49+
run: yarn test
50+
51+

.travis.yml

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

0 commit comments

Comments
 (0)