Skip to content

Update version requirement #48

Update version requirement

Update version requirement #48

Workflow file for this run

name: tests
on:
push:
pull_request:
# schedule:
# - cron: '00 4 * * *' # daily at 4AM
jobs:
build:
name: Test conftrack with Python ${{ matrix.python-version }} (${{ matrix.dependencies }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
dependencies: ["pip", "conda"]
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- name: Set env vars
run: |
export REPOSITORY_NAME=${GITHUB_REPOSITORY#*/} # just the repo, as opposed to org/repo
echo "REPOSITORY_NAME=${REPOSITORY_NAME}" >> $GITHUB_ENV
- name: Checkout the code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} with conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ${{ env.REPOSITORY_NAME }}-py${{ matrix.python-version }}
auto-update-conda: true
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
- name: Install auxiliary dependencies
run: |
set -vxeo pipefail
python3 -m pip install --upgrade pip wheel
- name: Install dependencies with ${{ matrix.dependencies }}
if: matrix.dependencies == 'pip'
run: |
set -vxeo pipefail
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements-dev.txt
- name: Install dependencies with ${{ matrix.dependencies }}
if: matrix.dependencies == 'conda'
run: |
set -vxeo pipefail
conda install -y -c conda-forge doct jsonschema mock mongomock pymongo pytest pyyaml requests tornado ujson
- name: Install the package
run: |
set -vxeo pipefail
python3 -m pip install . -vv --no-deps
- name: Check installed dependencies
run: |
set -vxeo pipefail
conda env list
pip list
conda list
- name: Test with pytest
run: |
set -vxeuo pipefail
pytest -s -vv