From 1f221997e5058c4ae203f6ae6fcdcc0ced910f7e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 2 Mar 2026 11:44:31 -0500 Subject: [PATCH] Add CI workflow for tests to match existing README badge README.md already had a tests badge pointing at .github/workflows/tests.yml, but that workflow never existed, so the badge rendered as "repo or workflow not found". Add the missing workflow: - pytest across Python 3.10-3.13 - coverage uploaded to Codecov from the 3.12 job - 10 min job timeout (tests fetch remote HDF5 files from DANDI) Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..f126dd7 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,38 @@ +name: Tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "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: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest pytest-cov + pip install -e . + - name: Run tests + run: pytest tests/ -v --cov=remfile --cov-report=xml + - name: Upload coverage to Codecov + if: matrix.python-version == '3.12' + uses: codecov/codecov-action@v4 + with: + file: ./coverage.xml + fail_ci_if_error: false