-
Notifications
You must be signed in to change notification settings - Fork 12
66 lines (62 loc) · 1.99 KB
/
test.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: "Test"
on:
workflow_call:
env:
COLORTERM: "yes"
TERM: "xterm-256color"
PYTEST_ADDOPTS: "--color=yes"
CONTAINER_RUNTIME: "docker"
jobs:
test:
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
include:
- image_tag: "nightly"
pulp_api_root: "/relocated/djnd/"
python: "3.9"
- image_tag: "3.21"
python: "3.8"
- image_tag: "3.20"
lower_bounds: true
python: "3.12"
- image_tag: "3.19"
python: "3.8"
- image_tag: "3.18"
python: "3.11"
- image_tag: "3.22"
lower_bounds: true
python: "3.10"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/cache@v4"
with:
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/*constraints.lock', '**/setup.py', '**/pyproject.toml') }}"
restore-keys: |
${{ runner.os }}-pip-
- name: "Download wheels"
uses: "actions/download-artifact@v4"
with:
name: "pulp_cli_packages"
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.python }}"
- name: "Install Python Test Dependencies"
run: |
if [ "${{matrix.lower_bounds}}" ]
then
pip install dist/pulp_cli_deb-*.whl pulp-glue-deb/dist/pulp_glue_deb-*.whl -r test_requirements.txt -c lower_bounds_constraints.lock
else
pip install dist/pulp_cli_deb-*.whl pulp-glue-deb/dist/pulp_glue_deb-*.whl -r test_requirements.txt
fi
- name: Run tests
env:
CONTAINER_RUNTIME: ${{ matrix.container_runtime }}
IMAGE_TAG: ${{ matrix.image_tag }}
FROM_TAG: ${{ matrix.from_tag }}
CONTAINER_FILE: ${{ matrix.container_file }}
PULP_API_ROOT: ${{ matrix.pulp_api_root }}
run: .ci/run_container.sh make test