Skip to content

Commit

Permalink
Add comments to changes outside the workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
giovanni-guidini committed Oct 9, 2023
1 parent c5dee75 commit dab7bfa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/codecov_ats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ jobs:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
ATS_TESTS_TO_RUN: ${{ steps.label_analysis.outputs.ATS_TESTS_TO_RUN }}
ATS_TESTS_TO_SKIP: ${{ steps.label_analysis.outputs.ATS_TESTS_TO_SKIP }}
ATS_TESTS_TO_RUN: ${{ steps.codecov_automated_test_selection.outputs.ATS_TESTS_TO_RUN }}
ATS_TESTS_TO_SKIP: ${{ steps.codecov_automated_test_selection.outputs.ATS_TESTS_TO_SKIP }}
steps:
- uses: actions/checkout@v3
with:
# fetch-depth: 0 - Use if the BASE_COMMIT on codecov_automated_test_selection is at unknown depth
# (i.e. git merge-base ${{ github.sha }}^ origin/main)
# fetch-depth: 2 - Use if the BASE_COMMIT on codecov_automated_test_selection is at known depth
# (i.e. git rev-parse ${{ github.sha }}^)
fetch-depth: 2
- name: Set up Python 3.10.10
uses: actions/setup-python@v4
Expand Down Expand Up @@ -83,10 +87,10 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_STATIC_TOKEN: ${{ secrets.CODECOV_STATIC_TOKEN }}
# Run label analysis in dry mode to get the list of tests to run
# Run Automated Test Selection in dry mode to get the list of tests to run
# The base commit will be the parent commit (apparently commits on master don't exist in codecov)
- name: Label Analysis
id: label_analysis
- name: Codecov Automated Test Selection
id: codecov_automated_test_selection
continue-on-error: true
run: |
BASE_COMMIT=$(git rev-parse ${{ github.sha }}^)
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ test-js-ci: node-version-check
@yarn run test-ci
@echo ""

# --cov-context=test is used to annotate what tests are being executed in the coverage info
# And it's used to power Codecov Automated Test Selection
# (see .github/workflows/codecov_ats.yml)
test-python-ci: create-db
@echo "--> Running CI Python tests"
pytest \
Expand Down

0 comments on commit dab7bfa

Please sign in to comment.