-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.45 KB
/
compatability-matrix.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
name: Compatibility Matrix
on:
push:
branches:
- github-ci
jobs:
CompatibilityMatrix:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11, 3.12, 3.x]
env:
MUST_RUN_VERSION: "3.12"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Get Python version
id: python_version
run: |
python --version
- name: Check if Python versions match
id: check_version
run: |
if [[ "${{ matrix.python-version }}" == "3.x" ]]; then
PYTHON_VERSION=$(python --version | grep -oP '(?<=Python\s)[\d.]+')
if [[ "$PYTHON_VERSION" == "${{ env.MUST_RUN_VERSION }}."* ]]; then
echo "skip-job=true" >> $GITHUB_ENV
fi
fi
- name: Install dependencies
if: env.skip-job != 'true'
run: |
pip install poetry
poetry install --with dev
- name: Check for outdated dependencies
if: env.skip-job != 'true'
run: |
poetry show --outdated --only main
- name: Update dependencies to the latest allowed versions
if: env.skip-job != 'true'
run: |
poetry update
echo "Dependencies updated"
- name: Run tests
if: env.skip-job != 'true'
run: |
poetry run pytest
continue-on-error: false