tests: add github action w/ basic CI tasks
This commit is contained in:
Родитель
9ad4a18cad
Коммит
c93e80b7cf
|
@ -0,0 +1,42 @@
|
|||
# The Travis CI is our full-fledged CI, but this Github workflow
|
||||
# runs some basics (build, lint, diff sample json, and unit-core)
|
||||
# and it should complete quickly, giving more immediate feedback
|
||||
# than waiting for Travis
|
||||
|
||||
name: 💡🏠
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
basics:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: git clone
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js 10.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
|
||||
# Cache yarn deps. thx https://github.com/actions/cache/blob/master/examples.md#node---yarn
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: Set up node_modules cache
|
||||
uses: actions/cache@v1
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- run: yarn --frozen-lockfile
|
||||
- run: yarn build-all
|
||||
- run: yarn diff:sample-json
|
||||
- run: yarn lint
|
||||
- run: yarn unit-core
|
||||
- run: yarn tsc -p .
|
Загрузка…
Ссылка в новой задаче