From 40ab75f3f487997f67efeb8b14ca013caf686a9e Mon Sep 17 00:00:00 2001 From: George Pearse Date: Sun, 2 Nov 2025 22:55:42 +0000 Subject: [PATCH] Add GitHub Actions CI workflow for automated testing - Run tests on every push to master/develop branches - Run tests on all PRs to master/develop - Test against Python 3.9, 3.10, 3.11, 3.12 - Generate coverage reports with Codecov - Ensures code quality and compatibility across Python versions --- .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..51d62f5 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,38 @@ +name: Tests + +on: + push: + branches: [ master, develop ] + pull_request: + branches: [ master, develop ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + + 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 -e . + pip install pytest pytest-cov + + - name: Run tests + run: | + pytest umap/tests/ -v --cov=umap --cov-report=xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: ./coverage.xml + fail_ci_if_error: false