From bb2f4c4836719f951056f2e580a68e70ec86cafe Mon Sep 17 00:00:00 2001 From: Kevin Meagher <11620178+kjmeagher@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:14:22 -0600 Subject: [PATCH] add ci with icetray docker (#15) --- .github/workflows/tests.yml | 31 +++++++++++++++++++++++-------- pyproject.toml | 4 ++-- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b0b7927..1ed27ca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,11 +22,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] - os: [ubuntu-22.04] - include: - - python-version: 3.12 - os: macos-12 + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -53,9 +50,27 @@ jobs: with: fail_ci_if_error: false verbose: true + TestsIceTray: + runs-on: ubuntu-latest + container: icecube/icetray:icetray-prod-v1.11.1-ubuntu22.04-X64 + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v4 + - name: Install i3astropy + run: python3 -m pip install 'astropy>=6' .[test] + - name: Run Unit Tests + run: /usr/local/icetray/env-shell.sh python -m pytest --junit-xml=test-results-icetray.junit.xml + - name: Upload Test Results + uses: actions/upload-artifact@v4 + if: always() + with: + if-no-files-found: error + name: test-results-icetray.junit.xml + path: test-results-icetray.junit.xml publish-test-results: name: "Publish Tests Results" - needs: Tests + needs: [Tests, TestsIceTray] runs-on: ubuntu-latest permissions: checks: write @@ -75,7 +90,7 @@ jobs: files: "*.xml" deduplicate_classes_by_file_name: true Docs: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest strategy: fail-fast: false steps: @@ -83,7 +98,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" cache: pip cache-dependency-path: pyproject.toml - name: Install i3astropy diff --git a/pyproject.toml b/pyproject.toml index 01512f8..530c3ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ 'Topic :: Scientific/Engineering :: Astronomy', 'Topic :: Scientific/Engineering :: Physics' ] -dependencies = ["numpy", "astropy"] +dependencies = ["numpy", "astropy>=5"] dynamic = ["version", "description"] keywords = ["python", "science", "astronomy", "astrophysics", "astropy", "IceCube", "neutrino"] license = {file = "LICENSES/BSD-2-Clause.txt"} @@ -34,7 +34,7 @@ requires-python = "~=3.9" dev = ["pre-commit"] docs = ['mkdocs'] examples = ["matplotlib"] -test = ["pytest", "pytest-cov"] +test = ["pytest>=7", "pytest-cov>=6"] [project.urls] Collaboration = "https://icecube.wisc.edu"