Skip to content

Commit

Permalink
Add separate actions for py version 3.10 and 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
czeni committed Jul 18, 2024
1 parent ea256d2 commit b30c421
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pytest
name: pytest-py3.10

on:
push:
Expand All @@ -13,12 +13,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache
with:
path: ~/.cache/pip
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/python-alg-tests_py3.11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: pytest-py3.11

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v4
id: cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install system dependencies
run: |
sudo apt update && sudo apt install -y graphviz graphviz-dev glpk-utils
- name: Install Python dependencies
run: |
python3.11 -m pip install -v --upgrade pip
python3.11 -m pip install -v -U -r requirements.txt
python3.11 -m pip install -vv -e .
- name: Test with pytest
run: |
python3.11 -m pytest -vv tests/
6 changes: 3 additions & 3 deletions .github/workflows/python-alg-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache
with:
path: ~/.cache/pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-publish-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
name: testpypi
url: https://test.pypi.org/project/SLAMBUC/
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache
with:
path: ~/.cache/pip
Expand Down

0 comments on commit b30c421

Please sign in to comment.