Skip to content

Commit

Permalink
feat: add test ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranet committed Sep 19, 2020
1 parent 506c319 commit 5cf5f76
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,31 @@ jobs:
run: yarn --frozen-lockfile
- name: Compile Projects
run: yarn build

Testing:
name: Unit Tests
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node_version: [12, 14]
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles(matrix.os == 'windows-latest' && '**\yarn.lock' || '**/yarn.lock') }}
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Run tests
run: yarn test

0 comments on commit 5cf5f76

Please sign in to comment.