Skip to content

Commit

Permalink
Updating CI config with poetry packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
carl-tstpd committed May 14, 2023
1 parent 8834dda commit 88e2e5e
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/ci.yaml
Expand Up @@ -21,14 +21,14 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v2.3.1
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Generate partial Python venv restore key
id: generate-python-key
run: >-
echo "::set-output name=key::base-venv-${{ env.CACHE_VERSION }}-${{
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt')
hashFiles('poetry.lock', 'pyproject.toml')
}}"
- name: Restore Python virtual environment
id: cache-venv
Expand All @@ -45,8 +45,8 @@ jobs:
run: |
python -m venv venv
. venv/bin/activate
python -m pip install -U pip setuptools wheel
pip install -U -r requirements_test.txt
python -m pip install -U pip poetry
poetry install
- name: Generate pre-commit restore key
id: generate-pre-commit-key
run: >-
Expand All @@ -72,7 +72,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
outputs:
python-key: ${{ steps.generate-python-key.outputs.key }}
steps:
Expand All @@ -82,14 +82,14 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v2.3.1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
id: generate-python-key
run: >-
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt')
hashFiles('poetry.lock', 'pyproject.toml')
}}"
- name: Restore Python virtual environment
id: cache-venv
Expand All @@ -106,8 +106,8 @@ jobs:
run: |
python -m venv venv
. venv/bin/activate
python -m pip install -U pip setuptools wheel
pip install -U -r requirements_test.txt
python -m pip install -U pip poetry
poetry install
pytest-linux:
name: Run tests Python ${{ matrix.python-version }} (Linux)
Expand All @@ -116,13 +116,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2.4.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v2.3.1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
uses: actions/checkout@v2.4.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v2.3.1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
outputs:
python-key: ${{ steps.generate-python-key.outputs.key }}
steps:
Expand All @@ -207,14 +207,14 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v2.3.1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
id: generate-python-key
run: >-
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
hashFiles('setup.cfg', 'requirements_test_min.txt')
hashFiles('poetry.lock', 'pyproject.toml')
}}"
- name: Restore Python virtual environment
id: cache-venv
Expand All @@ -231,8 +231,8 @@ jobs:
run: |
python -m venv venv
. venv\\Scripts\\activate
python -m pip install -U pip setuptools wheel
pip install -U -r requirements_test_min.txt
python -m pip install -U pip poetry
poetry install
pytest-windows:
name: Run tests Python ${{ matrix.python-version }} (Windows)
Expand All @@ -241,7 +241,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
steps:
- name: Set temp directory
run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
Expand All @@ -251,7 +251,7 @@ jobs:
uses: actions/checkout@v2.4.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v2.3.1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
Expand All @@ -277,7 +277,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["pypy3"]
python-version: ["pypy3.7", "pypy3.8", "pypy3.9"]
outputs:
python-key: ${{ steps.generate-python-key.outputs.key }}
steps:
Expand All @@ -287,14 +287,14 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v2.3.1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
id: generate-python-key
run: >-
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
hashFiles('setup.cfg', 'requirements_test_min.txt')
hashFiles('poetry.lock', 'pyproject.toml')
}}"
- name: Restore Python virtual environment
id: cache-venv
Expand All @@ -311,8 +311,8 @@ jobs:
run: |
python -m venv venv
. venv/bin/activate
python -m pip install -U pip setuptools wheel
pip install -U -r requirements_test_min.txt
python -m pip install -U pip poetry
poetry install
pytest-pypy:
name: Run tests Python ${{ matrix.python-version }}
Expand All @@ -321,13 +321,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["pypy3"]
python-version: ["pypy3.7", "pypy3.8", "pypy3.9"]
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2.4.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v2.3.1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
Expand Down

0 comments on commit 88e2e5e

Please sign in to comment.