From 8235add2aac543b9606444fcc54e60136a9747aa Mon Sep 17 00:00:00 2001 From: Adam Myers Date: Wed, 11 Sep 2024 16:54:22 -0600 Subject: [PATCH] last try: align coverage test exactly with desispec, which seems to be working --- .github/workflows/python-package.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 92394819..21424dbd 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -55,45 +55,45 @@ jobs: name: Test coverage runs-on: ${{ matrix.os }} strategy: - fail-fast: false + fail-fast: true matrix: os: [ubuntu-latest] - python-version: ['3.10'] # ADM Python 3.11 still has problems with Numpy 1.23. - fitsio-version: ['<2'] # ADM latest version. - numpy-version: ['<1.23'] # to keep asscalar, used by astropy. - matplotlib-version: ['<3.6.3'] # later versions of matplotlib require later versions of numpy. + python-version: ['3.10'] # latest + astropy-version: ['<6'] # latest + fitsio-version: ['<2'] # latest + numpy-version: ['<1.23'] # to keep asscalar, used by astropy env: DESIUTIL_VERSION: 3.4.2 DESIMODEL_DATA: branches/test-0.18 steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install Python dependencies run: | python -m pip install --upgrade pip setuptools wheel python -m pip install pytest pytest-cov coveralls python -m pip install git+https://github.com/desihub/desiutil.git@${DESIUTIL_VERSION}#egg=desiutil python -m pip install -r requirements.txt + python -m pip install specutils python -m pip install -U 'numpy${{ matrix.numpy-version }}' - python -m pip install -U 'matplotlib${{ matrix.matplotlib-version }}' + python -m pip install -U 'astropy${{ matrix.astropy-version }}' python -m pip cache remove fitsio python -m pip install --no-deps --force-reinstall --ignore-installed 'fitsio${{ matrix.fitsio-version }}' svn export https://desi.lbl.gov/svn/code/desimodel/${DESIMODEL_DATA}/data - name: Run the test with coverage run: DESIMODEL=$(pwd) pytest --cov -# - name: Coveralls -# env: -# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: coveralls + - name: Coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: coveralls docs: name: Doc test