feat: add OAuth2 login/logout with PKCE #58
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: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: latest | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [blacksmith-2vcpu-ubuntu-2404, macos-latest, windows-latest] | |
| go: ['1.24'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run tests (Unix) | |
| if: runner.os != 'Windows' | |
| run: go test -v -race -coverprofile=coverage.out ./... | |
| - name: Run tests (Windows) | |
| if: runner.os == 'Windows' | |
| run: go test -v -race ./... | |
| - name: Upload coverage | |
| if: matrix.os == 'blacksmith-2vcpu-ubuntu-2404' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.out | |
| flags: unittests | |
| fail_ci_if_error: false | |
| # Summary job for matrix test runs. GitHub requires a single check for branch protection, | |
| # but matrix jobs create multiple checks. This job provides a single "Check Tests Passed" | |
| # status that succeeds only if all matrix test jobs succeed. | |
| validate-tests-passed: | |
| name: Check Tests Passed | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| needs: test | |
| if: always() | |
| steps: | |
| - name: Check test matrix status | |
| if: needs.test.result != 'success' | |
| run: exit 1 | |
| build: | |
| name: Build | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| needs: [lint, test] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Build | |
| run: make build-all | |
| - name: Verify binary | |
| run: ./bin/rootly version |