-
Notifications
You must be signed in to change notification settings - Fork 53
94 lines (83 loc) · 2.24 KB
/
tests.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: 🕵️ Test suite
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout to master
uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- uses: pre-commit/action@v3.0.1
- name: Install build dependencies
run: |
python -m pip install -U pip
pip install -U wheel setuptools build
- name: Build
run: python -m build -o dist/
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
build_check:
runs-on: ubuntu-22.04
needs: [build]
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- run: pipx run twine check --strict dist/*
test:
runs-on: ${{ matrix.os }}
needs: [build]
strategy:
matrix:
# todo: extract from source
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
os: [ubuntu-22.04, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}
- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.16"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel setuptools_scm
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: install wheel with test extras
run: |
WHEEL_FILE=$(ls dist/*.whl)
pip install "$WHEEL_FILE[test]"
- name: test bonfire version and create default config file
run: |
pip list | grep crc-bonfire
which bonfire
bonfire --help
bonfire config write-default
- name: pytest
run: pytest -sv