Skip to content

Avoid runtime import of StrPath #65

Avoid runtime import of StrPath

Avoid runtime import of StrPath #65

Workflow file for this run

name: Tests
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
tests:
strategy:
matrix:
os: ['Windows', 'macOS', 'Ubuntu']
python-version: ['3.8', '3.9', '3.10']
include:
- os: Windows
image: windows-latest
- os: macOS
image: macos-latest
- os: Ubuntu
image: ubuntu-latest
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.image }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Poetry
run: pipx install Poetry
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Update PATH
if: ${{ matrix.os != 'Windows' }}
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Update PATH (Windows)
if: ${{ matrix.os == 'Windows' }}
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install
- name: Install pytest annotation plugin
run: poetry run pip install pytest-github-actions-annotate-failures
- name: Run tests with coverage
if: ${{ matrix.os != 'Ubuntu' }}
run: poetry run pytest --cov=diskfs tests/
- name: Run tests with coverage (Ubuntu)
if: ${{ matrix.os == 'Ubuntu' }}
run: sudo -E env "PATH=$PATH" poetry run pytest --cov=diskfs tests/
- name: Upload coverage data to Coveralls
run: poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}