Skip to content

Commit

Permalink
added poetry run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-ht committed Dec 4, 2024
1 parent 101462f commit 9513c09
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/python-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,34 @@ name: Python tests

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

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pipx install poetry
- name: Install dependencies
run: |
poetry env use python${{ matrix.python-version }}
poetry install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8
- name: Test with pytest
run: |
pytest
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pipx install poetry
- name: Install dependencies
run: |
poetry env use python${{ matrix.python-version }}
poetry install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8
- name: Test with pytest
run: |
poetry run pytest

0 comments on commit 9513c09

Please sign in to comment.