43 lines (37 loc) · 998 Bytes
/
tox-docker.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
on:
workflow_call:
inputs:
python-version:
description: >-
Python version to use for installing pip-tools.
required: false
type: string
default: '3.12'
jobs:
tox:
runs-on: ubuntu-22.04
container: coatldev/six:${{ inputs.python-version }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Upgrade pre-installed dependencies
run: |
python -m pip install --upgrade \
pip \
setuptools \
wheel
- name: Install dependencies
run: |
python -m pip install tox
- name: Set PY
run: |
echo "PY=$(python --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- name: Cache tox
id: cache-tox
uses: actions/cache@v4
with:
path: .tox
key: tox-${{ env.PY }}-${{ runner.os }}-${{ hashFiles('tox.ini') }}
- name: Run tests
run: |
tox