test: verify private module fix (github-workflows#46) #2
Workflow file for this run
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
| on: | ||
|
Check failure on line 1 in .github/workflows/verify.yaml
|
||
| workflow_call: | ||
| inputs: | ||
| ref: | ||
| required: true | ||
| type: string | ||
| run_tests: | ||
| required: false | ||
| type: boolean | ||
| default: true | ||
| secrets: | ||
| RELENG_GITHUB_TOKEN: | ||
| required: false | ||
| description: "GitHub token with access to private ConductorOne repos (for baton-http imports)" | ||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| GOPRIVATE: github.com/conductorone/* | ||
| steps: | ||
| - name: Checkout caller repo | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| path: _caller | ||
| repository: ${{ github.event.repository.full_name }} | ||
| fetch-depth: 0 | ||
| ref: ${{ inputs.ref }} | ||
| - name: Configure git for private modules | ||
| if: ${{ secrets.RELENG_GITHUB_TOKEN != '' }} | ||
| run: git config --global url."https://${{ secrets.RELENG_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" | ||
| - name: Install Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: _caller/go.mod | ||
| - name: Run linters | ||
| uses: golangci/golangci-lint-action@v8 | ||
| with: | ||
| version: latest | ||
| args: --timeout=3m | ||
| working-directory: _caller | ||
| test: | ||
| if: inputs.run_tests == true | ||
| strategy: | ||
| matrix: | ||
| platform: [ubuntu-latest] | ||
| runs-on: ${{ matrix.platform }} | ||
| env: | ||
| GOPRIVATE: github.com/conductorone/* | ||
| steps: | ||
| - name: Checkout caller repo | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| repository: ${{ github.event.repository.full_name }} | ||
| fetch-depth: 0 | ||
| ref: ${{ inputs.ref }} | ||
| - name: Configure git for private modules | ||
| if: ${{ secrets.RELENG_GITHUB_TOKEN != '' }} | ||
| run: git config --global url."https://${{ secrets.RELENG_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" | ||
| - name: Install Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go.mod | ||
| - name: go tests | ||
| run: go test -v -covermode=count -json ./... | tee test.json | ||
| - name: annotate go tests | ||
| if: always() | ||
| uses: guyarb/golang-test-annotations@v0.8.0 | ||
| with: | ||
| test-results: test.json | ||