[Operator] Fix vstack #401
Workflow file for this run
This file contains 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: python-coverage | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
op-unit-test: | |
concurrency: | |
group: op-unit-test-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
uses: ./.github/workflows/op-unit-test.yaml | |
model-test: | |
concurrency: | |
group: model-test-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
uses: ./.github/workflows/model-test.yaml | |
coverage-test: | |
concurrency: | |
group: coverage-test-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
runs-on: [self-hosted, docker] | |
needs: [op-unit-test, model-test] | |
container: | |
image: localhost:5000/flag-gems-ci:v1.0 | |
ports: | |
- 81 | |
options: --gpus all --hostname flag-gems_cicd_coverage -v /home/flaggems_cicd/PR_Coverage:/PR_Coverage | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get python coverage | |
shell: bash | |
run: | | |
git config --global --add safe.directory /__w/FlagGems/FlagGems | |
if [ "${{ github.event_name }}" == "pull_request" ]; then | |
echo "This is a pull request event. PR number is ${{ github.event.pull_request.number }}" | |
bash tools/code_coverage/coverage.sh ${{ github.event.pull_request.number }} | |
elif [ "${{ github.event_name }}" == "push" ]; then | |
PR_NUMBER=$(git log -1 --pretty=format:'%s' | grep -oE '#[0-9]+' | grep -oE '[0-9]+') | |
echo "This is a push event. The relate PR number is ${PR_NUMBER}" | |
bash tools/code_coverage/coverage.sh ${PR_NUMBER} | |
fi |