Skip to content

Ebola model updates #52

Ebola model updates

Ebola model updates #52

Workflow file for this run

name: create PyGOM distributions
on:
push:
branches:
- master
- dev
- feature/*
- bugfix/*
pull_request:
branches:
- master
- dev
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest] #, macos-13, macos-14]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
# Fetch tag manually because fetch-tags option for checkout@v4 does not work
- name: Fetch tag annotations
run: |
# Fetch tag manually because fetch-tags option for checkout@v4 does not work
git fetch --force --tags --depth 1
- id: read_tag
name: Set VERSION env variable
if: ${{ startsWith(github.ref, 'refs/tags') }}
run: |
# Set tag from GitHub: using git describe for tags inside the run script
# seems not working
echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/cache@v4
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v4
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v4
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Check python version
run: python -c "import sys; print(sys.version)"
- name: Install pip
run: |
python -m pip install --upgrade pip
- name: Install coverage
run: |
python -m pip install codecov
- name: install PyGOM
run: |
pip install .
- name: Run tests
run: coverage run -m unittest discover --verbose --start-directory tests