Skip to content

Merge pull request #41 from jet-net/JOSS-2023 #273

Merge pull request #41 from jet-net/JOSS-2023

Merge pull request #41 from jet-net/JOSS-2023 #273

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Python dependencies
run: pip install black
- name: Run linters
uses: wearerequired/lint-action@v2
with:
auto_fix: true
black: true
black_auto_fix: true
# TODO: might want to consider running tests only for changed files at some point https://github.com/marketplace/actions/changed-files
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.11"]
pytest-file:
[
"tests/datasets/test_jetnet.py",
"tests/datasets/test_normalisations.py",
"tests/datasets/test_utils.py",
"tests/utils/test_image.py",
"tests/evaluation/test_gen_metrics.py",
]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-xdist
pip install -e .
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pytest -n 0 --durations 0 -v -m "not slow" -k ${{ matrix.pytest-file }}