Skip to content

Merge pull request #4 from ARTIST-Association/features/DWD_data #18

Merge pull request #4 from ARTIST-Association/features/DWD_data

Merge pull request #4 from ARTIST-Association/features/DWD_data #18

Workflow file for this run

name: Python test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@main
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov coverage-badge .
- name: Test with pytest and coverage badge
if: matrix.python-version != '3.12'
run: |
pytest --cov=paint
coverage-badge -fo coverage.svg
- name: Tests with pytest and no badge
if: matrix.python-version == '3.12'
run: |
pytest --cov=paint
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v19
id: verify-changed-files
with:
files: coverage.svg
- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true' && matrix.python-version == '3.11'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "Updated coverage.svg"
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true' && matrix.python-version == '3.11'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.github_token }}
branch: ${{ github.ref }}