From ca4bbca6cf65205e056b812e9fc72ab621f41f09 Mon Sep 17 00:00:00 2001 From: tztsai <13818704679@163.com> Date: Mon, 4 Dec 2023 21:35:22 +0000 Subject: [PATCH] debug CI --- .github/workflows/pyrealm_ci.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pyrealm_ci.yaml b/.github/workflows/pyrealm_ci.yaml index 31b28b9a..3638a9e2 100644 --- a/.github/workflows/pyrealm_ci.yaml +++ b/.github/workflows/pyrealm_ci.yaml @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - lfs: true + ref: ${{ github.head_ref }} - uses: actions/setup-python@v4 with: @@ -42,23 +42,22 @@ jobs: # run: poetry run pytest -m "not profiling" --cov-report xml - name: Run profiling - if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 - # && github.ref == 'refs/heads/main' + id: profiling + if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 # && github.ref == 'refs/heads/main' run: | git lfs pull - git update-index --assume-unchanged pyrealm_build_data/*.nc 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 + rm pyrealm_build_data/*.nc - name: Generate report - if: env.REPORT == 1 uses: stefanzweifel/git-auto-commit-action@v5 + if: steps.profiling.outcome == 'success' with: - commit_message: Automated report - file_pattern: '*.csv *.png *.svg' + file_pattern: 'profiling/*' + commit_message: Auto-generated report - name: Upload coverage reports to Codecov if: success() && (matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9)