-
-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (34 loc) · 1.06 KB
/
ci.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
name: Continuous Integration
on:
push:
branches:
- 'main'
pull_request:
jobs:
Continuous-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- name: Use Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: 16
- name: Restore CI Cache
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
id: cache-restore
with:
path: node_modules
key: ${{ runner.os }}-16-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies if Cache Miss
if: ${{ !steps.cache-restore.outputs.cache-hit }}
run: yarn --immutable
- name: Check Liniting
run: yarn lint
- name: Run Tests
if: ${{ github.event_name == 'push' }}
env:
VITE_CLIENT_ID: '${{ secrets.CLIENT_ID }}'
VITE_CLIENT_SECRET: '${{ secrets.CLIENT_SECRET }}'
run: yarn test
- name: Build Code
run: yarn build