config: reject names containing slashes #5888
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
| name: Go | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Build | |
| run: go build -v ./... | |
| # Produce a coverage profile (Codecov coverage) and a JUnit XML (Codecov | |
| # Test Analytics) in one run. The `timeout -s QUIT 5m` wrapper is kept so a | |
| # hung test still dumps goroutine stacks. continue-on-error + explicit exit | |
| # keeps the upload steps reachable on failure (that is when test results are | |
| # most useful); a later step re-surfaces the failure. | |
| - name: Test | |
| id: gotest | |
| continue-on-error: true | |
| run: | | |
| go install github.com/jstemmer/go-junit-report/v2@latest | |
| set -o pipefail | |
| # -p 4 caps how many package test binaries run at once. Several | |
| # packages (api, diag, maintenance) each spin up pebble caches and do | |
| # real encryption/snapshot work; with the default parallelism they | |
| # over-subscribe the runner's cores, starve each other, and blow the | |
| # per-test timeout -- which kills the whole package and reports every | |
| # test in it as failed-to-return to Codecov. Capping concurrency keeps | |
| # the run both fast and reliable. | |
| timeout -s QUIT 5m go test -v -p 4 -coverprofile=coverage.out -covermode=atomic -timeout 2m -json ./... \ | |
| | "$(go env GOPATH)/bin/go-junit-report" -parser gojson -set-exit-code > junit.xml | |
| status=$? | |
| echo "test_exit=$status" >> "$GITHUB_OUTPUT" | |
| exit $status | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.out | |
| fail_ci_if_error: false | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./junit.xml | |
| report_type: test_results | |
| fail_ci_if_error: false | |
| - name: Fail if tests failed | |
| if: ${{ steps.gotest.outputs.test_exit != '0' }} | |
| run: exit 1 |