Add Mkdocs version of the documentation #612
This file contains hidden or 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: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| generate_files: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v1 | |
| - name: Install dependencies | |
| run: python3 -m pip install -r docs/requirements.txt | |
| - name: Run files generation tests | |
| run: pre-commit run --all-files && [[ -z "$(git status -s)" ]] | |
| launch-slurm-actions-runner: | |
| needs: [generate_files] | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Copy job script to the cluster | |
| run: | | |
| ssh mila mkdir -p "/tmp/${GITHUB_RUN_ID}" | |
| scp .github/setup_github_runner.sh mila:"/tmp/${GITHUB_RUN_ID}/setup_github_runner.sh" | |
| - name: Launch Slurm Actions Runner | |
| run: | | |
| ssh mila "cd \"\${SCRATCH}\" && sbatch --job-name=\"gh-actions-runner-${GITHUB_RUN_ID}\" \"/tmp/${GITHUB_RUN_ID}/setup_github_runner.sh\"" | |
| # This step runs in a self-hosted Github Actions runner inside a SLURM job on a compute node of the cluster. | |
| slurm_integration_tests: | |
| name: Run integration tests on the Mila cluster in a SLURM job | |
| needs: [launch-slurm-actions-runner] | |
| runs-on: ["self-hosted", "mila-1"] | |
| timeout-minutes: 180 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "latest" | |
| # https://github.com/astral-sh/setup-uv?tab=readme-ov-file#github-authentication-token | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install dependencies | |
| run: uv sync --all-groups | |
| - name: Test with pytest | |
| run: uv run --all-groups pytest -v -n 4 | |
| # TODO: Add code coverage for the examples? | |
| # - name: Store coverage report as an artifact | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: coverage-reports-slurm-integration-tests-mila | |
| # path: ./coverage.xml |