build: bump version #50
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 | |
defaults: | |
run: | |
shell: bash | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv | |
id: cached-poetry-venv | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-venv.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction | |
- name: Run tests | |
run: | | |
source $VENV | |
poetry run pytest --cov --cov-report=xml --junitxml=tests.xml | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() | |
with: | |
name: Test Results (Python version ${{ matrix.python-version }}) | |
path: tests.xml | |
reporter: java-junit | |
coverage: | |
strategy: | |
matrix: | |
python-version: [ "3.8" ] | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv | |
id: cached-poetry-venv | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ matrix.python-version }}-{{ runner.os }}-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-venv.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction | |
- name: Run tests | |
run: poetry run pytest --cov --cov-report=xml --junitxml=tests.xml | |
- name: Code Coverage Report | |
uses: irongut/CodeCoverageSummary@v1.3.0 | |
with: | |
filename: coverage.xml | |
fail_below_min: true | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: '90 95' | |
- name: Output Code Coverage (Python version ${{ matrix.python-version }}) | |
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | |
typecheck: | |
strategy: | |
matrix: | |
python-version: [ "3.8" ] | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv | |
id: cached-poetry-venv | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ matrix.python-version }}-{{ runner.os }}-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-venv.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction | |
- name: Type checker | |
run: poetry run mypy codestripper |