Skip to content

ci: AUT-784 pin GitHub Actions to commit SHAs #1337

ci: AUT-784 pin GitHub Actions to commit SHAs

ci: AUT-784 pin GitHub Actions to commit SHAs #1337

Workflow file for this run

name: Run tests
on:
workflow_dispatch:
workflow_call:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Install the latest version of uv
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
with:
version: "latest"
- name: uv sync
run: uv sync --extra skypilot
- shell: bash
run: |
git config --global user.name github-actions[bot]
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Run coverage
run: |
uv run -- coverage run --branch --source=nemo_run -a -m pytest
uv run -- coverage report -m
- name: Run example notebooks
run: |
uv run -- coverage run --branch --source=nemo_run -a -m jupyter execute examples/**/*.ipynb
uv run -- coverage report -m
- name: Run example scripts
run: |
uv run -- coverage run --branch --source=nemo_run -a examples/hello-world/hello_scripts.py
uv run -- coverage report -m
- name: Generate report
run: |
uv run -- coverage xml
uv run -- coverage report
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
verbose: true
flags: cpu
base_sha: ${{ github.event.pull_request.base.sha }}