-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 1.59 KB
/
example-2-caching.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
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
name: Example 2 - Caching
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
linting:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.8.10
uses: actions/setup-python@v2
with:
python-version: 3.8.10
- name: Install Poetry
run: |
pip install -U pip
pip install wheel
pip install poetry
- name: Setup Cache
uses: actions/cache@v2
id: cache
with:
path: example-2-caching/.venv
key: example-2-caching-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
make example-2-install
- name: linting
run: |
make example-2-lint
unit-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.8.10
uses: actions/setup-python@v2
with:
python-version: 3.8.10
- name: Install Poetry
run: |
pip install -U pip
pip install wheel
pip install poetry
- name: Setup Cache
uses: actions/cache@v2
id: cache
with:
path: example-2-caching/.venv
key: example-2-caching-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
make example-2-install
- name: Unit tests
run: |
make example-2-unit-tests