-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1 KB
/
build.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
---
name: build
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: get_python_version
name: Get Python version
run: |
set -euo pipefail
python_version=$(cat ${GITHUB_WORKSPACE}/.python-version)
echo "Python version: ${python_version}"
echo "python_version=$python_version" >> "$GITHUB_OUTPUT"
- uses: actions/setup-python@v4
with:
python-version: ${{ steps.get_python_version.outputs.python_version }}
- name: Setup pipenv
run: python -m pip install --upgrade pipenv wheel
- id: cache-pipenv
uses: actions/cache@v3
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}-dev
- name: Install
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: make install_ci
env:
PIPENV_DEV: true
- name: Test
run: make test