Add the test coverage report and reviewer check #55
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: flagscale-test | |
on: | |
push: | |
branches: [ "main" , "test_coverage"] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
container-test-job: | |
runs-on: self-hosted | |
container: | |
image: localhost:5000/flagscale_cicd:v1.3 | |
ports: | |
- 80 | |
volumes: | |
- /home/flagscale_cicd/flask/static:/workspace/report | |
options: --gpus all --hostname flagscale_cicd | |
steps: | |
- name: checkout-code | |
uses: actions/checkout@v2 | |
- name: unit_test-megatron | |
run: | | |
cd megatron | |
export PYTHONPATH=..:$PYTHONPATH | |
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib --cov-append --cov-report=html:/workspace/report/${{github.sha}}/cov-report-megatron --cov=megatron/core -q -x tests/unit_tests/data | |
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib --cov-append --cov-report=html:/workspace/report/${{github.sha}}/cov-report-megatron --cov=megatron/core -q -x tests/unit_tests/dist_checkpointing | |
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib --cov-append --cov-report=html:/workspace/report/${{github.sha}}/cov-report-megatron --cov=megatron/core -q -x tests/unit_tests/fusions | |
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib --cov-append --cov-report=html:/workspace/report/${{github.sha}}/cov-report-megatron --cov=megatron/core -q -x tests/unit_tests/models | |
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib --cov-append --cov-report=html:/workspace/report/${{github.sha}}/cov-report-megatron --cov=megatron/core -q -x tests/unit_tests/pipeline_parallel | |
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib --cov-append --cov-report=html:/workspace/report/${{github.sha}}/cov-report-megatron --cov=megatron/core -q -x tests/unit_tests/tensor_parallel | |
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib --cov-append --cov-report=html:/workspace/report/${{github.sha}}/cov-report-megatron --cov=megatron/core -q -x tests/unit_tests/transformer | |
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib --cov-append --cov-report=html:/workspace/report/${{github.sha}}/cov-report-megatron --cov=megatron/core -q -x tests/unit_tests/*.py | |
- name: Access code coverage results megatron | |
run: | | |
echo "You can access the test coverage report at the http://120.92.110.224:8081/${{github.sha}}/cov-report-megatron/index.html" | |
- name: Archive code coverage results megatron | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report-megatron | |
path: /workspace/report/${{github.sha}}/cov-report-megatron | |
- name: unit_test-flagscale | |
run: | | |
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib --cov-append --cov-report=html:/workspace/report/${{github.sha}}/cov-report-flagscale --cov=flagscale -q -x tests/unit_tests/launcher | |
- name: Access code coverage results flagscale | |
run: | | |
echo "You can access the test coverage report at the http://120.92.110.224:8081/${{github.sha}}/cov-report-flagscale/index.html" | |
- name: Archive code coverage results flagscale | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report-flagscale | |
path: /workspace/report/${{github.sha}}/cov-report-flagscale | |
- name: functional_test-flagscale | |
run: | | |
python run.py --config-path tests/functional_tests/aquila/conf --config-name config action=test | |
pytest -s tests/functional_tests/test_result.py --test_reaults_path=./tests/functional_tests/aquila/test_result |