Skip to content

Merge pull request #20 from emirkmo/reinforcement-learning #51

Merge pull request #20 from emirkmo/reinforcement-learning

Merge pull request #20 from emirkmo/reinforcement-learning #51

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions: write-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- name: Set up Python 3.10
uses: actions/setup-python@v4.3.0
with:
python-version: "3.10"
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi
- name: Test with pytest
run: |
python -m pytest rawsight --cache-clear --cov=rawsight | tee pytest-coverage.txt
- name: Pytest coverage report
id: coverageComment
uses: MishaKav/pytest-coverage-comment@v1.1.39
with:
pytest-coverage-path: ./pytest-coverage.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
default-branch: master
- name: create dynamic badge
if: ${{ github.ref == 'refs/heads/master' }}
uses: schneegans/dynamic-badges-action@v1.6.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 092a8fbf51f22d7ccf5fc01059f5d5d4
filename: rawsight_badge.json
label: Test Coverage
message: ${{ steps.coverageComment.outputs.coverage }}
color: ${{ steps.coverageComment.outputs.color }}
namedLogo: python