Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #45 from wellyshen/feature/add-check-and-test-action
Browse files Browse the repository at this point in the history
ci: add check and test action
  • Loading branch information
wellyshen committed Nov 6, 2020
2 parents 981842c + b821bc3 commit 6b2bc5b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .changeset/friendly-poems-lick.md
@@ -0,0 +1,2 @@
---
---
45 changes: 45 additions & 0 deletions .github/workflows/check-and-test.yml
@@ -0,0 +1,45 @@
name: Type Check / Lint / Unit Test / Build Test

on: [pull_request, push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Get cached node modules
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run type check
run: yarn type-check
- name: Run lint
run: yarn lint
- name: Run test
run: yarn test:cov
- name: Run build
run: yarn build

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6b2bc5b

Please sign in to comment.