Feature/docs #86
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
# .github/workflows/ci.yml | |
name: CI/CD | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
name: continuous-integration | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install the project | |
run: uv sync --all-extras --dev | |
# - name: Run tests | |
# # For example, using `pytest` | |
# run: uv run pytest tests | |
# Format code | |
- name: Run type checker | |
run: uvx mypy py_launch_blueprint/ | |
- name: Check linters | |
run: uvx ruff check py_launch_blueprint/ | |
# - name: Run tests with coverage | |
# run: | | |
# pytest --cov=./ --cov-report=xml | |
# - name: Upload coverage | |
# uses: codecov/codecov-action@v4 | |
security: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run Safety CLI to check for vulnerabilities | |
uses: pyupio/safety-action@v1 | |
with: | |
api-key: ${{ secrets.SAFETY_API_KEY }} | |
args: --detailed-output # To always see detailed output from this action | |
docs: | |
needs: [ test, security ] # Wait for test & security jobs to pass | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' # Deploy only on main push | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
uv sync --all-extras --dev | |
uv pip install mkdocs-material mkdocstrings[python] | |
- name: Build and deploy template documentation | |
run: mkdocs gh-deploy --forcez | |
working-directory: ./template_docs # Double-check this path matches your docs folder | |
# publish: | |
# needs: [test, security] | |
# if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Build and publish to PyPI | |
# env: | |
# TWINE_USERNAME: __token__ | |
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
# run: | | |
# uv pip install build twine | |
# python -m build | |
# twine upload dist/* |