fix(oauth): request the scopes the extension and CLI actually need #1
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: OAuth Scopes | |
| # Nightly against coder-preview catches server-side scope changes before they ship. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - src/oauth/constants.ts | |
| - test/scopes/** | |
| - .github/workflows/oauth-scopes.yaml | |
| pull_request: | |
| paths: | |
| - src/oauth/constants.ts | |
| - test/scopes/** | |
| - .github/workflows/oauth-scopes.yaml | |
| schedule: | |
| - cron: "0 6 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-scopes: | |
| name: OAuth Scopes | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| services: | |
| postgres: | |
| image: postgres:17 | |
| env: | |
| POSTGRES_USER: coder | |
| POSTGRES_PASSWORD: coder | |
| POSTGRES_DB: coder | |
| coder: | |
| image: ghcr.io/coder/coder-preview:latest | |
| ports: | |
| - 7080:7080 | |
| env: | |
| CODER_PG_CONNECTION_URL: postgres://coder:coder@postgres:5432/coder?sslmode=disable | |
| CODER_HTTP_ADDRESS: 0.0.0.0:7080 | |
| CODER_ACCESS_URL: http://localhost:7080 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm, Node.js, and dependencies | |
| uses: ./.github/actions/setup | |
| - name: Wait for Coder | |
| run: timeout 120 sh -c 'until curl -sf http://localhost:7080/healthz; do sleep 2; done' | |
| - run: pnpm test:scopes | |
| env: | |
| CODER_URL: http://localhost:7080 |