Skip to content

bugfix

bugfix #339

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [master]
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
poetry-version: [1.3.2]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Run Tests
env: # Or as an environment variable
STAKE_TOKEN: ${{ secrets.STAKE_TOKEN }}
run: poetry install && poetry run pytest --cov=stake --cov-report=xml && poetry run coverage-badge -f -o coverage.svg
- name: Upload coverage
uses: actions/upload-artifact@v2
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7 }}
with:
name: coverage
path: coverage.svg
- name: Auto commit coverage badge
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7 }}
uses: EndBug/add-and-commit@v4.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@master
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7 }}
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml