WIP #42
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: Tests | |
on: | |
push: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10'] | |
name: Test with Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install msccl and dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run tests and check at least 85% coverage | |
run: | | |
pytest | |
compare_outputs: | |
runs-on: ubuntu-latest | |
name: Compare outputs | |
steps: | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Checkout current branch | |
uses: actions/checkout@v4 | |
- name: Install msccl and dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Copy test script to temp directory | |
run: | | |
cp tests/generate_exmpale_results.py $RUNNER_TEMP/ | |
- name: generate outputs | |
run: | | |
python $RUNNER_TEMP/generate_exmpale_results.py examples/mscclang/ $RUNNER_TEMP/tests/pr-outputs/ tests/configs/example-config.json | |
- name: Checkout main branch | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Install msccl and dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: generate outputs | |
run: | | |
python $RUNNER_TEMP/generate_exmpale_results.py examples/mscclang/ $RUNNER_TEMP/tests/main-outputs/ tests/configs/example-config.json | |
- name: Compare outputs | |
run: | | |
diff -rw $RUNNER_TEMP/tests/main-outputs/ $RUNNER_TEMP/tests/pr-outputs/ | |