add valset_producer #4
This file contains hidden or 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: Coverage | |
on: | |
push: | |
branches: [ "**" ] | |
jobs: | |
compute_coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Pyton | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f extra_requirements.txt ]; then pip install -r extra_requirements.txt; fi | |
- name: Compute coverage | |
run: | | |
python -m pytest --cov=sar_sampling --cov-report=term-missing --local-badge-output-dir=${{ github.workspace }}/.github/badges > coverage.txt | |
- name: Push changes | |
run: | | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
if git diff --quiet; then | |
git status | |
echo "No files to update" | |
else | |
git add -u | |
git commit -m "chore: update coverage data" | |
git push | |
fi |