Skip to content

Commit

Permalink
chore: add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tadayosi committed Jun 18, 2022
1 parent c57dc04 commit e75ba8b
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test

on:
pull_request:
branches:
- main
paths-ignore:
- "**.md"
push:
branches:
- main
paths-ignore:
- "**.md"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '14', '16' ]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Test
run: yarn test

0 comments on commit e75ba8b

Please sign in to comment.