ignoring cached exceptions (#8) #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
# Test pushes and pull requests on non-main branches | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest ] | |
python-version: [ "3.10" ] | |
name: test - Python ${{ matrix.python-version }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
# Python setup | |
- name: Set up Python environment | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Install build dependencies | |
- name: Install build dependencies | |
run: python -m pip install --upgrade pip setuptools wheel poetry nox | |
# Setup Poetry caching | |
- name: Get Poetry cache dir | |
id: poetry-cache | |
run: echo "::set-output name=dir::$(poetry config cache-dir)" | |
- name: Poetry/Nox cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.poetry-cache.outputs.dir }} | |
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-test-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-poetry-test- | |
${{ runner.os }}-${{ matrix.python-version }}-poetry- | |
# Install build dependencies | |
- name: Install build dependencies | |
run: poetry install | |
# Run tests | |
- name: Run tests | |
run: poetry run pytest tests -m "not local" |