Merge pull request #43 from WFP-VAM/fix/token_refresh #87
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: Python package | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv and set Python version | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Lint with Ruff | |
| run: | | |
| uv run ruff check . --fix | |
| - name: Run tests | |
| run: | | |
| uv run pytest | |
| deploy-docs: | |
| runs-on: ubuntu-latest | |
| # Only publish docs on push, not PR. | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git Credentials | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| - name: Install uv and set Python version | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Deploy documentation | |
| run: uv run mkdocs gh-deploy --force |