Skip to content

Commit

Permalink
add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maurerle committed Oct 31, 2024
1 parent 1bc7ca6 commit 6b10509
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 3 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/lint-pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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 }}
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Check reuse compliance
run: |
pip install reuse
reuse lint
- name: Install dependencies
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install -e .
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff check .
ruff format .
- name: Test with pytest & integration tests
run: |
pytest
- name: Upload tests results
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.python-version }}
path: |
coverage.xml
result.xml
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@ classifiers=[
requires-python = ">=3.10"
dependencies = [
"argcomplete >=3.1.4",
"nest-asyncio >=1.5.6",
"mango-agents >=1.2",
"numpy >=1.26.4",
"tqdm >=4.64.1",
"python-dateutil >=2.8.2",
"sqlalchemy >=2.0.9",
"pandas >=2.0.0",
]

Expand Down

0 comments on commit 6b10509

Please sign in to comment.