Skip to content

Commit

Permalink
Merge pull request #167 from nnsnodnb/update-actions
Browse files Browse the repository at this point in the history
Update actions
  • Loading branch information
nnsnodnb authored Dec 17, 2023
2 parents de635d4 + d5bbdb3 commit de98b61
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 36 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python environment
Expand All @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python environment
Expand All @@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python environment
Expand All @@ -61,7 +61,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python environment
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install dependencies
- name: Install poetry
run: |
python -m pip install -U pip
pip install poetry==1.3.1
poetry config virtualenvs.in-project true
pip install -U pip pipx
pipx install poetry
poetry run pip install -U setuptools pip
- name: Configure poetry
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'

- name: Build & Publish to PyPI
env:
API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
38 changes: 11 additions & 27 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:

jobs:
tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

name: Python ${{ matrix.python-version }} tests

Expand All @@ -20,37 +20,21 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Get full Python version
id: full-python-version
run: echo "name=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> "{GITHUB_OUTPUT}"

- name: Bootstrap poetry
shell: bash
- name: Install poetry
run: |
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install poetry==1.3.1
pip install -U pip pipx
pipx install poetry
- name: Configure poetry
shell: bash
run: python -m poetry config virtualenvs.in-project true

- name: Set up cache
uses: actions/cache@v3
id: cache
uses: actions/setup-python@v5
with:
path: .venv
key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}

- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: timeout 10s python -m poetry run pip --version || rm -rf .venv
python-version: ${{ matrix.python-version }}
cache: 'poetry'

- name: Install dependencies
shell: bash
run: |
python -m poetry install
poetry install --sync --no-root
echo "${{ secrets.VOIP_PEM_BASE64 }}" | base64 -d > ./tests/clients/voip/dummy.pem
- name: Run pytest
Expand All @@ -59,8 +43,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
python -m poetry run python -m pytest -v tests
python -m poetry run coverage report
poetry run python -m pytest -v tests
poetry run coverage report
- name: Coveralls Parallel
uses: AndreMiras/coveralls-python-action@develop
Expand Down

0 comments on commit de98b61

Please sign in to comment.