Updated release notes #254
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: mlinfra ci run | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
lint: | |
name: Run code checks and formatting hooks | |
runs-on: ubuntu-latest | |
env: | |
MYPY_CACHE_DIR: "${{ github.workspace }}/.cache/mypy" | |
RUFF_CACHE_DIR: "${{ github.workspace }}/.cache/ruff" | |
PRE_COMMIT_HOME: "${{ github.workspace }}/.cache/pre-commit" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # for documentation builds | |
- name: Set up Python and dependencies | |
uses: ./.github/actions/setup-python | |
with: | |
pythonVersion: "3.11" | |
dependencyType: "dev" | |
- name: Cache pre-commit tools | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ env.MYPY_CACHE_DIR }} | |
${{ env.RUFF_CACHE_DIR }} | |
${{ env.PRE_COMMIT_HOME }} | |
key: ${{ runner.os }}-${{ hashFiles('requirements-dev.txt', '.pre-commit-config.yaml') }}-linter-cache | |
- name: Run pre-commit checks | |
run: pre-commit run --all-files --verbose --show-diff-on-failure | |
test: | |
name: Test mlinfra on ubuntu-latest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python and dependencies | |
uses: ./.github/actions/setup-python | |
with: | |
pythonVersion: "3.11" | |
dependencyType: "dev" | |
- name: Run Tests | |
run: | | |
pytest | |
docs: | |
name: Build documentation for mlinfra | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python and dependencies | |
uses: ./.github/actions/setup-python | |
with: | |
pythonVersion: "3.11" | |
dependencyType: "docs" | |
- name: Build documentation using mike | |
uses: ./.github/actions/mike-docs | |
with: | |
version: development | |
pre_release: true # include pre-release notification banner | |
push: ${{ github.ref == 'refs/heads/main' }} # build always, publish on 'main' only to prevent version clutter |