Skip to content

Tests

Tests #82

Workflow file for this run

name: "Tests"
on:
workflow_call:
workflow_dispatch:
merge_group:
permissions:
actions: read
contents: write
pages: write
id-token: write
jobs:
validate-pr:
env:
ARCH_NAME: wormhole_b0
runs-on: ["in-service", "n150"]
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Install dependencies
run: |
python3 -m venv venv
source venv/bin/activate
python3 -m pip config set global.extra-index-url https://download.pytorch.org/whl/cpu
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-dev.txt
python3 -m pip install pytest-github-report
- name: Run Tools Tests
env:
pytest_verbosity: 2
pytest_report_title: "⭐️ Tools Tests"
run: |
source venv/bin/activate
python3 -m pytest --github-report tests/tools/ -s
- name: Run Lowering Tests
id: lowering_tests
env:
pytest_verbosity: 2
pytest_report_title: "⭐️ Aten → TTNN Lowering Tests"
run: |
source venv/bin/activate
python3 -m pytest --github-report tests/lowering/ -s
- name: Check runner debug
if: ${{ runner.debug == '1' }}
run: |
echo "TT_METAL_WATCHER=120" >> $GITHUB_ENV
echo "TT_METAL_WATCHER_APPEND=0" >> $GITHUB_ENV
echo "TT_METAL_WATCHER_DUMP_ALL=1" >> $GITHUB_ENV
- name: Run Model Tests
id: model_tests
if: steps.lowering_tests.outcome == 'success'
env:
pytest_verbosity: 2
pytest_report_title: "⭐️ Model Tests"
run: |
source venv/bin/activate
python3 -m pytest --github-report tests/models/ -s
- name: Collect Metrics Report
if: ${{ github.event_name == 'merge_group' && steps.lowering_tests.outcome == 'success' && steps.model_tests.outcome == 'success' }}
env:
PYTHON_PATH: $(pwd)
run: |
source venv/bin/activate
python3 tools/collect_metrics.py
git status
git add README.md
git commit -m '[auto][on-merge-queue] Update metrics report in README.md'
git push