Skip to content

Commit

Permalink
add github action which runs some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maurerle committed Nov 1, 2024
1 parent ef8fd4a commit 161c37b
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/lint-pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SPDX-FileCopyrightText: Florian Maurer
#
# SPDX-License-Identifier: AGPL-3.0-or-later

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Tests

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

jobs:
jupyter:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Check reuse compliance
run: |
pip install reuse
reuse lint
- name: Install assume-framework
run: |
pip install assume-framework[all]
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
pip install ruff
ruff check .
ruff format .
- name: Test with pytest & integration tests
run: |
pip install pytest-asyncio pytest-cov
assume -i inputs -s example_01a -c tiny
assume -i inputs -s example_02a -c tiny
assume -i inputs -s example_02d -c tiny
- name: Upload tests results
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.python-version }}
path: |
coverage.xml
result.xml

0 comments on commit 161c37b

Please # to comment.