-
Notifications
You must be signed in to change notification settings - Fork 9
49 lines (42 loc) · 1.38 KB
/
workflow.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
name: CI workflow
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# Grab Node Version
- name: Get Node Version
id: node
run: |
echo "::set-output name=version::$(node -v)"
# Grab Node Cache
- name: Get Node Modules Cache
uses: actions/cache@v3
id: node_modules
with:
path: |
**/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ steps.node.outputs.version }}
# ^ If the OS, yarn.lock, Node version doesn't change, this will use the workflow cache
# Set up Node Version
- name: Setup Node
uses: actions/setup-node@v3.1.1
with:
node-version: v16.14.2
cache: 'yarn'
cache-dependency-path: app/yarn.lock # <- This is needed for some reason, but the file is empty when I open it (Antonio)
# Install yarn and npm
- name: Install Dependencies
run: |
cd app
yarn install # <- yarn manages caching
npm install
# Print Coverage Report
- name: Print coverage report
run: |
cd app
npm run coverage