Skip to content

[pre-commit.ci] pre-commit autoupdate #232

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #232

Workflow file for this run

name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
# Needed for mamba to work
defaults:
run:
shell: bash -l {0}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8 # to match beast2 conda recipe
uses: actions/setup-java@v1
with:
java-version: 8
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channel-priority: strict # Snakemake errors otherwise
- name: Install Poetry and nox
run: |
curl -sSL https://install.python-poetry.org | python3 -
pip install nox nox-poetry
- name: Set up cache for nox
uses: actions/cache@v2
id: cached-nox-datadir
with:
path: .nox
key: nox-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/pyproject.toml') }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if pyproject.toml has not changed
CACHE_NUMBER: 0
- name: Get Date
id: get-date
run: echo "::set-output name=today::$(/bin/date -u '+%Y%m%d')"
shell: bash
- name: Set up cache for conda
uses: actions/cache@v2
id: cached-conda-envsdir
with:
path: tests/.conda
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('mccoy/workflow/envs/*') }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if the env files have not changed
CACHE_NUMBER: 2
- name: Set up cache for beast extensions
uses: actions/cache@v2
id: cached-beast-extensions
with:
path: ~/.beast
key: beast_exts-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('mccoy/workflow/envs/beast*') }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if the env files have not changed
CACHE_NUMBER: 1
- name: Run nox
# Run nox using the version of Python in `PATH`
run: nox --force-python python