generated from cognitedata/bootcamp-functions
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.15 KB
/
deploy-pr.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
name: Validate Pull Request
on:
pull_request:
jobs:
deploy:
name: Validate Pull Request (unit tests)
runs-on: ubuntu-latest
strategy:
matrix:
function:
- execute_rest_extractor
- oee_timeseries
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Load cached $HOME/.local
uses: actions/cache@v2
with:
path: ~/.local
key: dotlocal-${{ runner.os }}-${{ hashFiles('.github/workflows/deploy-pr.yaml') }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.10
virtualenvs-path: .venv
installer-parallel: true
- name: Load cached poetry venv
id: cached-poetry-venv
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/deploy-pr.yaml') }}
- name: Install dependencies using poetry (skipped on cache hit)
run: poetry install
if: steps.cached-poetry-venv.outputs.cache-hit != 'true'