Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 18 additions & 24 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,31 @@ name: "Build and Test"

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

jobs:
build:

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

steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
poetry install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with unittest
run: poetry run python -m unittest discover test
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
uv run flake8 --count --select=E9,F63,F7,F82 --show-source --statistics ./evl ./test ./*.py
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
uv run flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics ./evl ./test ./*.py
- name: Test with unittest
run: uv run python -m unittest discover test
Loading