-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (37 loc) · 1.31 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
name: CI workflow
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
PIP_CACHE_DIR: /cache/pip # Set custom cache directory
steps:
- name: Checkout
uses: actions/checkout@v3
# Cache Dependencies
- name: Set up Dependencies Cache
uses: actions/cache@v3
with:
path: app/cache/pip
key: Linux-pip-5a10801b288f9708023ca35be6b49ba1ed92ff245458982f0b7795057b587f54
restore-keys: Linux-pip-
# Check for Cache Hit
- name: Check if cache hit
id: cache-check
run: echo "::set-output name=cache-hit::$(echo ${{ steps.cache-check.outputs.cache-hit }})"
# Install Dependencies (on No Cache Hit)
- name: Install dependencies
if: steps.cache-check.outputs.cache-hit != 'true'
run: |
cd app
npm install
# Check for Cached Dependencies
- name: List cached directories after dependency installation
run: ls /cache/pip || true
# Upload Coverage Report
- name: Upload coverage report
run: |
cd app
npm run coverage