Skip to content

Commit

Permalink
Modernise CI/CD-pipeline
Browse files Browse the repository at this point in the history
- Upgrade to more recent versions of actions
- Test python versions 3.9-3.12
- Use ubuntu-latest
- Use poetry 1.8.3

Signed-off-by: Tormod Haugland <[email protected]>
  • Loading branch information
tOgg1 committed Jul 3, 2024
1 parent 09e5c5b commit 683a97c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 33 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/pre-commit.yml

This file was deleted.

31 changes: 14 additions & 17 deletions .github/workflows/primary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,18 @@ on:
jobs:
test:

runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
poetry-version: ["1.3.1"]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
poetry-version: [ "1.8.3" ]

steps:
- uses: actions/checkout@v2
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}

- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
Expand All @@ -36,23 +33,23 @@ jobs:
release:
needs: test
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: |
pip install twine
pip install poetry==1.1.4
pip install wheel
poetry config virtualenvs.create false
poetry install --no-interaction
poetry install
- name: Build package
run: make build
- name: Publish package
Expand Down

0 comments on commit 683a97c

Please sign in to comment.