tests: add github action w/ basic CI tasks

This commit is contained in:
Paul Irish 2020-03-10 13:16:11 -07:00 коммит произвёл GitHub
Родитель 9ad4a18cad
Коммит c93e80b7cf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 42 добавлений и 0 удалений

42
.github/workflows/basics.yml поставляемый Normal file
Просмотреть файл

@ -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 .