-
-
Notifications
You must be signed in to change notification settings - Fork 221
40 lines (37 loc) · 1.12 KB
/
unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Unit Tests
on:
push:
branches:
- master
- main
pull_request:
jobs:
getNodeVersion:
uses: gagoar/ts-node-template/.github/workflows/get_node_version.yml@main
unit-test:
runs-on: ubuntu-latest
needs: getNodeVersion
steps:
- name: Checkout 🛎️
uses: actions/checkout@main
- name: Setting node version to ${{ needs.getNodeVersion.outputs.node_version }}
uses: actions/setup-node@v2
with:
node-version: '${{ needs.getNodeVersion.outputs.node_version }}'
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: '.yarn/cache'
key: ${{ runner.os }}-yarn-${{ needs.getNodeVersion.outputs.node_version }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn
- name: Build packages 🔧
run: yarn build
- name: Testing Library 🕵️♀️
run: yarn test:ci
- name: Send coverage to codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests