Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tztsai committed Dec 4, 2023
1 parent 45dee69 commit c4c6b89
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/pyrealm_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,24 @@ jobs:
# run: poetry run pytest -m "not profiling" --cov-report xml

- name: Run profiling
id: profiling
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
# && github.ref == 'refs/heads/main'
run: |
git update-index --assume-unchanged *.nc
git lfs pull
poetry run pytest -m "profiling" --profile-svg
# mv prof/combined.svg profiling/profiling.svg
mv prof/combined.prof profiling/profiling.prof
# mv prof/combined.svg profiling/profiling.svg
poetry run python profiling/report.py
echo "REPORT=1" >> $GITHUB_ENV
- name: Generate report
if: env.REPORT == 1
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Automated report
file_pattern: 'profiling/*'
if: steps.profiling.outcome == 'success'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add profiling/*
git commit -m "Auto-generated report"
git push origin
- name: Upload coverage reports to Codecov
if: success() && (matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9)
Expand Down

0 comments on commit c4c6b89

Please sign in to comment.