Use GitHub Actions
This commit is contained in:
parent
f5a13c39d6
commit
0b19f08f3f
|
@ -0,0 +1,39 @@
|
||||||
|
name: test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
tags-ignore:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- run: echo "::set-output name=version::$(cat .nvmrc)"
|
||||||
|
id: nvmrc
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: "${{ steps.nvmrc.outputs.version }}"
|
||||||
|
|
||||||
|
- run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
id: yarn-cache
|
||||||
|
|
||||||
|
- name: Restore dependency cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: "${{ steps.yarn-cache.outputs.dir }}"
|
||||||
|
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-cache-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: yarn test
|
Loading…
Reference in New Issue