From 1fcd229e9d294d2f8929cd22e7638a6f1f1aaf95 Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson Date: Sun, 31 Jul 2022 16:22:34 +1000 Subject: [PATCH] Record sha number in test results package. --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7635a28e..eef66ddd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,14 @@ jobs: pip install -r requirements.txt pip install pytest-github-actions-annotate-failures - name: Test - run: python setup.py test --addopts "-v --durations=0 --junitxml=test-results/junit.xml --cov=nss_cache" + run: | + mkdir -p test-results + if [[ ${{ github.event_name }} == 'pull_request' ]]; then + echo ${{ github.event.pull_request.head.sha }} > test-results/sha-number + else + echo ${{ github.sha }} > test-results/sha-number + fi + python setup.py test --addopts "-v --durations=0 --junitxml=test-results/junit.xml --cov=nss_cache" - uses: codecov/codecov-action@v3 if: always() - name: Install