generated from Uninen/vite-ts-tailwind-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 1.97 KB
/
main.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
ci:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
## Yarn dir
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
## Cache
- name: Cache yarn cache
uses: actions/cache@v2
id: cache-yarn-cache2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2-
## Cache
- name: Cache node_modules
id: cache-node-modules2
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules2-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-nodemodules2-
## Cache
- name: Cache Cypress
id: cache-cypress2
uses: actions/cache@v2
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.os }}-${{ matrix.node-version }}-cypress2-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-cypress2-
## Dependencies
- name: Install Dependencies
if: |
steps.cache-yarn-cache.outputs.cache-hit != 'true' ||
steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
## Test
- name: Start Vite devserver
run: yarn start
- name: Run tests
run: yarn test:ci
- name: Upload artifacts on fail
uses: actions/upload-artifact@v2
if: failure()
with:
name: videos
path: tests/e2e/videos/