Backport of query: add -query flag to validate command into v1.14 #1082
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: equivalence-test-update | |
| on: | |
| pull_request_target: | |
| types: [ closed ] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| jobs: | |
| check: | |
| name: "Should run equivalence tests?" | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_run: ${{ steps.target_branch.outputs.should_run }} | |
| steps: | |
| - name: target_branch | |
| id: target_branch | |
| run: | | |
| merged='${{ github.event.pull_request.merged }}' | |
| target_branch='${{ github.event.pull_request.base.ref }}' | |
| targets_release_branch=false | |
| if [ "$target_branch" == "main" ]; then | |
| targets_release_branch=true | |
| elif [ "$target_branch" =~ ^v[0-9]+\.[0-9]+$ ]; then | |
| targets_release_branch=true | |
| fi | |
| should_run=false | |
| if [ "$merged" == "true" ] && [ "$targets_release_branch" == "true" ]; then | |
| should_run=true | |
| fi | |
| echo "should_run=$should_run" >> ${GITHUB_OUTPUT} | |
| run-equivalence-tests: | |
| name: "Run equivalence tests" | |
| needs: | |
| - check | |
| if: needs.check.outputs.should_run == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| ref: ${{ inputs.target-branch }} | |
| - name: Determine Go version | |
| id: go | |
| uses: ./.github/actions/go-version | |
| - name: Install Go toolchain | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version: ${{ steps.go.outputs.version }} | |
| cache-dependency-path: go.sum | |
| - uses: ./.github/actions/equivalence-test | |
| with: | |
| target-equivalence-test-version: 0.5.0 | |
| target-os: linux | |
| target-arch: amd64 | |
| current-branch: ${{ github.event.pull_request.base.ref }} | |
| new-branch: equivalence-testing/${{ github.event.pull_request.head.ref }} | |
| reviewers: ${{ github.event.pull_request.merged_by.login }} | |
| message: "Update equivalence test golden files after ${{ github.event.pull_request.html_url }}." |