Add Docusaurus documentation setup and update .gitignore #11
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: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Pin toolchain (fix covdata) | |
| run: go env -w GOTOOLCHAIN=local | |
| - name: Run tests | |
| run: go test -race -coverprofile=coverage.out -covermode=atomic ./... | |
| - name: Coverage report | |
| run: | | |
| go tool cover -func=coverage.out | |
| echo "## Coverage Summary" >> $GITHUB_STEP_SUMMARY | |
| go tool cover -func=coverage.out | tail -1 >> $GITHUB_STEP_SUMMARY | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: coverage.out | |
| - name: Run vet | |
| run: go vet ./... | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.4.0 | |
| benchmark: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Pin toolchain (fix covdata) | |
| run: go env -w GOTOOLCHAIN=local | |
| - name: Run benchmarks | |
| run: go test -bench=. -benchmem -run=^$ ./auth/... ./permission/... 2>&1 | tee benchmark.txt | |
| - name: Upload benchmark results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results | |
| path: benchmark.txt |