infer experiment name from directory, or supply, and passthru #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python Install and Tests | |
on: | |
push: | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install just the lint dependencies first | |
run: python -m pip install flake8 isort ruff | |
- name: Lint with ruff | |
run: ruff check | |
- name: Check format with ruff | |
run: ruff format --check | |
- name: Install dependencies | |
run: | | |
sudo apt install libimage-exiftool-perl -y | |
python -m pip install --upgrade pip | |
python -m pip install .[lint,test,pipeline] | |
- name: Test with pytest | |
run: | | |
if [ "${{ inputs.coverage_threshold }}" -gt 0 ]; then | |
pytest --cov-fail-under=${{ inputs.coverage_threshold }} --cov-report xml:coverage.xml | |
else | |
pytest --cov-report xml:coverage.xml | |
fi | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: coverage.xml | |
path: coverage.xml |