-
Notifications
You must be signed in to change notification settings - Fork 15
44 lines (37 loc) · 971 Bytes
/
test.yaml
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
41
42
43
name: Tests
# Tests runs unit tests over the entire repository.
# This workflow is run on every pull request and push to main.
on:
pull_request:
push:
branches:
- master
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Compute diff 📜
uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: +(src|__tests__|**)/**/*.+(js|jsx|ts|tsx)
FILES: |
package.json
yarn.lock
- name: Install 🔨
if: env.GIT_DIFF
run: yarn install --immutable
- name: Run unit tests 🧪
if: env.GIT_DIFF
run: yarn test --coverage
- name: Run build check
if: env.GIT_DIFF
run: yarn build
- name: Run e2e tests
if: env.GIT_DIFF
uses: cypress-io/github-action@v2
with:
start: yarn start