Skip to content

Commit 02c99cc

Browse files
committed
chore(ci): automatic tests
1 parent b297b52 commit 02c99cc

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/tests.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Automatic Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Get yarn cache directory path
13+
id: yarn-cache-dir-path
14+
run: echo "::set-output name=dir::$(yarn cache dir)"
15+
16+
- name: Yarn cache
17+
uses: actions/cache@v1
18+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
19+
with:
20+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
21+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-v2
22+
restore-keys: |
23+
${{ runner.os }}-yarn-
24+
25+
- name: Dependencies cache
26+
uses: actions/cache@v2
27+
with:
28+
path: |
29+
node_modules
30+
**/node_modules
31+
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
32+
33+
- name: Cypress cache
34+
uses: actions/cache@v1
35+
with:
36+
path: /home/runner/.cache/Cypress
37+
key: ${{ runner.os }}-Cypress-v1
38+
39+
- name: Install
40+
run: yarn --frozen-lockfile
41+
42+
- name: Lint
43+
run: |
44+
yarn run lint
45+
46+
- name: Types tests
47+
run: |
48+
yarn run test:types
49+
50+
- name: Build package
51+
run: |
52+
yarn run build
53+
54+
- name: Unit tests
55+
run: |
56+
yarn run test:unit
57+
58+
# - name: E2E tests
59+
# run: |
60+
# cd packages/demo
61+
# yarn run test
62+
63+
# - uses: actions/upload-artifact@v1
64+
# with:
65+
# name: Cypress Videos
66+
# path: packages/demo/tests/e2e/videos

0 commit comments

Comments
 (0)