bump version #14
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: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Sync dependencies | |
| run: | | |
| uv sync | |
| - name: Ruff lint | |
| run: | | |
| uv run ruff check | |
| - name: Ruff format check | |
| run: | | |
| uv run ruff format --check | |
| - name: MyPy type checking | |
| run: | | |
| uv run mypy . | |
| - name: Run tests | |
| run: | | |
| uv run pytest | |
| - name: Integration test | |
| run: | | |
| # Start service in background | |
| uv run fastapi run --port 8000 & | |
| sleep 5 | |
| # Get OIDC token and test the endpoint | |
| TOKEN=$(curl -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ | |
| "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=test" | jq -r '.value') | |
| curl -f -X POST -H "Content-Type: application/json" \ | |
| -d "{\"oidc_token\": \"$TOKEN\"}" \ | |
| http://localhost:8000/github/github-app-token-exchange | |
| env: | |
| GITHUB_APP_NAME: "GHA OIDC Token Exchange" | |
| GITHUB_APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} | |
| GITHUB_APP_CLIENT_ID: "Iv23ligOPEIJDirDT4V5" | |
| ALLOWED_AUDIENCE: "test" |