Skip to content

Feature/v1.0.1 fixes #70

Feature/v1.0.1 fixes

Feature/v1.0.1 fixes #70

Workflow file for this run

name: test
on:
push:
pull_request:
jobs:
linting:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
#----------------------------------------------
# load pip cache if cache exists
#----------------------------------------------
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
restore-keys: ${{ runner.os }}-pip
#----------------------------------------------
# install and run linters
#----------------------------------------------
- run: python -m pip install black==23.11.0 flake8 isort
- run: |
flake8 .
black . --check
isort .
test:
needs: linting
env:
ANKR_API_KEY: ${{ secrets.ANKR_API_KEY }}
strategy:
fail-fast: true
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
runs-on: "ubuntu-latest"
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Run tests
run: |
source .venv/bin/activate
pytest