Upgrading GoLang version to 1.25 and metric store release to 1.8.1 #492
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: Test Everything | |
| on: | |
| pull_request: | |
| jobs: | |
| test-job: | |
| name: All Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21.4' | |
| id: go | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - uses: actions/github-script@v3 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const { data: labels } = await github.issues.listLabelsOnIssue({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| }); | |
| const labelToRemove = 'tests-passed'; | |
| const labelExists = labels.some(label => label.name === labelToRemove); | |
| console.log("labelExists: ", labelExists); | |
| if (labelExists) { | |
| await github.issues.removeLabel({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| name: labelToRemove | |
| }); | |
| } | |
| - name: Run Tests | |
| run: | | |
| echo "Git HEAD at: $(git rev-parse HEAD)" | |
| ./scripts/test unit || ./scripts/test unit || ./scripts/test unit | |
| success-job: | |
| needs: test-job | |
| name: Add Label | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v3 | |
| with: | |
| github-token: ${{secrets.GITHUB_TOKEN}} | |
| script: | | |
| github.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['tests-passed'] | |
| }) |