change interrupt behaviour on quit in editor #299
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: Generate Coverage Badges | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- .github/workflows/coverage.yml | |
- cat_win/** | |
# only trigger on development branch | |
branches: | |
- 'dev' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Set Windows Line Ending | |
run: | | |
git config --global core.autocrlf true | |
- name: Git Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # otherwise, it will fail to push refs to dest repo | |
ref: 'dev' | |
- name: Install Python 3.10 | |
id: python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Update PIP | |
run: | | |
python -m pip install --upgrade pip | |
- name: Setup Dependencies | |
run: | | |
python -m pip install --upgrade -r ./workflowHelper/requirements.txt | |
python -m pip install --upgrade coverage | |
python -m pip install --upgrade pytest | |
python -m pip install --upgrade genbadge[tests,coverage] | |
- name: Generate Reports | |
run: | | |
python -m coverage run -m pytest ./cat_win/tests/ --junitxml=./reports/pytest.xml | |
python -m coverage xml -o ./reports/coverage.xml | |
- name: Show Missing Coverage | |
run: | | |
python -m coverage report --show-missing | |
- name: Create / Move To Badge-Branch | |
run: | | |
git checkout badges 2> /dev/null || git checkout -b badges | |
mkdir -p .github/badges | |
- name: Generate Badges | |
run: | | |
python -m genbadge.main tests -i ./reports/pytest.xml -o ./.github/badges/badge-tests.svg | |
python -m genbadge.main coverage -i ./reports/coverage.xml -o ./.github/badges/badge-coverage.svg | |
- name: Show Changes | |
run: | | |
git status | |
- name: Commit Changes | |
run: | | |
git config --local user.name 'github-actions[bot]' | |
git config --local user.email 'github-actions[bot]@users.noreply.github.com' | |
git add ./.github/badges/badge-coverage.svg | |
git add ./.github/badges/badge-tests.svg | |
git commit -m "🤖Generated Coverage Badges." | |
git push origin HEAD:badges | |
continue-on-error: true |