Tests (os: ubuntu-latest, docker: latest) #25
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: "Tests" | |
| run-name: "Tests (os: ${{ inputs.os }}, docker: ${{ inputs.docker-version }})" | |
| on: | |
| workflow_call: | |
| inputs: &inputs | |
| os: | |
| type: string | |
| default: ubuntu-latest | |
| description: OS for the runner | |
| docker-version: | |
| type: string | |
| default: latest | |
| description: Docker engine version | |
| secrets: | |
| QODANA_LICENSE_ONLY_TOKEN: | |
| required: true | |
| workflow_dispatch: | |
| inputs: *inputs | |
| jobs: | |
| test: | |
| name: Run tests | |
| runs-on: ${{ inputs.os }} | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| # - name: Setup Docker | |
| # uses: ./.github/actions/setup-docker | |
| # with: | |
| # version: ${{ inputs.docker-version }} | |
| - name: Setup Podman | |
| uses: ./.github/actions/setup-podman | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| cache-dependency-path: "**/*.sum" | |
| go-version-file: go.work | |
| - name: Set up Java 17 for config-loader-cli.jar | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Create mock artifact dependencies | |
| # Note: these dependencies contain closed-source code and are not currently available on Github. | |
| shell: bash | |
| run: >- | |
| touch | |
| cdnet/clt.zip | |
| tooling/baseline-cli.jar | |
| tooling/intellij-report-converter.jar | |
| tooling/qodana-fuser.jar | |
| clang/clang-tidy-linux-amd64.tar.gz | |
| clang/clang-tidy-linux-arm64.tar.gz | |
| clang/clang-tidy-windows-amd64.zip | |
| clang/clang-tidy-windows-arm64.zip | |
| clang/clang-tidy-darwin-amd64.tar.gz | |
| clang/clang-tidy-darwin-arm64.tar.gz | |
| - name: Install test dependencies | |
| run: go install github.com/mfridman/tparse@latest | |
| - name: Build | |
| # Build everything that will be tested. Although go test performs a build itself, gotestfmt will panic on a | |
| # failed build. | |
| shell: bash | |
| run: | | |
| go generate -v $(go list -f '{{.Dir}}/...' -m) | |
| go build -v $(go list -f '{{.Dir}}/...' -m) | |
| - name: Export GOROOT and GOPATH | |
| shell: bash | |
| run: | | |
| echo "GOROOT=$(go env GOROOT)" >> "$GITHUB_ENV" | |
| echo "GOPATH=$(go env GOPATH)" >> "$GITHUB_ENV" | |
| - name: Run tests | |
| run: go test -v -json $(go list -f '{{.Dir}}/...' -m) -timeout 0 -coverprofile coverage-${{ inputs.os }}.out | tparse -all -follow | |
| env: | |
| QODANA_LICENSE_ONLY_TOKEN: ${{ secrets.QODANA_LICENSE_ONLY_TOKEN }} |