Skip to content

add python 3.12

add python 3.12 #44

Workflow file for this run

name: Ensure Sufficient Coverage
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'PR Ready for Review')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
python -m pip install -e .
python -m pip install coverage
- name: Compile Sambvca21
run: |
gfortran -o sambvca21.x test/sambvca21.f
- name: Run Tests
run: |
coverage run --source=. --omit=py2sambvca/__init__.py,setup.py,test/* -m unittest discover
- name: Show Coverage
run: |
coverage report -m > temp.txt
cat temp.txt
python .github/workflows/coverage_helper.py
echo "COVERAGE_PERCENT=$(cat temp2.txt)" >> $GITHUB_ENV
- name: Request Changes via Review
if: ${{ env.COVERAGE_PERCENT < 100 }}
uses: andrewmusgrave/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
event: REQUEST_CHANGES
body: 'Increase test coverage from ${{ env.COVERAGE_PERCENT }}% to 100% before merging.'
- name: Approve PR if Coverage Sufficient
if: ${{ env.COVERAGE_PERCENT == 100 }}
uses: andrewmusgrave/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
event: APPROVE
body: 'Test coverage meets 100% requirement (currently ${{ env.COVERAGE_PERCENT }}%).'