Skip to content

Merge branch 'v1.4.x' into test_under_slurm #185

Merge branch 'v1.4.x' into test_under_slurm

Merge branch 'v1.4.x' into test_under_slurm #185

Workflow file for this run

name: Test Package
on:
workflow_dispatch:
workflow_call:
push:
<<<<<<< HEAD

Check failure on line 7 in .github/workflows/PackageTest.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/PackageTest.yml

Invalid workflow file

You have an error in your yaml syntax on line 7
=======
schedule:
- cron: 0 7 1,15 * *
>>>>>>> v0.4.x
jobs:
run-tests:
name: Run Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
<<<<<<< HEAD
slurm_version:
- 20.02.5.1
- 20.11.9.1
- 22.05.2.1
python_version:
- 3.8
- 3.9
container:
image: ghcr.io/pitt-crc/test-env:${{ matrix.slurm_version }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Setup environment
run: /usr/local/bin/entrypoint.sh
- name: Checkout source code
uses: actions/checkout@v3
- name: Install poetry
run: |
pip install poetry
poetry env use python${{ matrix.python_version }}
=======
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
>>>>>>> v0.4.x
- name: Install dependencies
run: poetry install --with tests
- name: Run tests with coverage
run: |
poetry run coverage run -m unittest discover
poetry run coverage report --omit="tests/*"
poetry run coverage xml --omit="tests/*" -o coverage.xml
# Report partial coverage results to codacy for the current python version
- name: Report partial coverage results
if: github.event_name != 'release'
<<<<<<< HEAD
shell: bash
=======
>>>>>>> v0.4.x
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l Python -r coverage.xml
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
# Tell codacy we are done reporting test coverage
report-code-coverage:
name: Report Coverage
if: github.event_name != 'release'
needs: run-tests
runs-on: ubuntu-latest
steps:
- name: Finish reporting coverage
<<<<<<< HEAD
shell: bash
=======
>>>>>>> v0.4.x
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) final
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
# Use this job for branch protection rules
report-test-status:
name: Report Test Status
if: always()
needs: run-tests
runs-on: ubuntu-latest
steps:
- name: Check build status
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1