Optimization: Defer Projections for Server Queries #7646
Workflow file for this run
This file contains 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: Check/Format PR | |
on: | |
pull_request: | |
branches: [ main ] | |
concurrency: | |
group: format-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
format: | |
name: Format PR | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.REPO_ACCESS_TOKEN || secrets.GITHUB_TOKEN }} | |
ref: ${{ github.head_ref }} | |
- name: Setup Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Install goimports | |
run: | | |
go mod download golang.org/x/tools | |
go install golang.org/x/tools/cmd/goimports | |
- name: Format repo | |
run: | | |
./format_repo.sh | |
env: | |
BRANCH_NAME: ${{ github.head_ref }} | |
CHANGE_TARGET: ${{ github.base_ref }} | |
- name: Changes detected | |
id: detect-changes | |
run: | | |
changes=$(git status --porcelain) | |
if [ ! -z "$changes" ]; then | |
echo "has-changes=true" >> $GITHUB_OUTPUT | |
fi | |
- uses: EndBug/add-and-commit@v9.1.1 | |
if: ${{ steps.detect-changes.outputs.has-changes == 'true' }} | |
with: | |
message: "[ga-format-pr] Run ./format_repo.sh to fix formatting" | |
add: "." | |
cwd: "." | |
verify: | |
needs: format | |
name: Verify format | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
id: go | |
- name: Check all | |
id: check_format | |
run: | | |
./check_repo.sh | |
env: | |
BRANCH_NAME: ${{ github.head_ref }} | |
CHANGE_TARGET: ${{ github.base_ref }} | |
alt-verify: | |
if: github.event.pull_request.head.repo.full_name != github.repository | |
name: Verify format | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
id: go | |
- name: Check all | |
id: check_format | |
run: | | |
./check_repo.sh | |
code=$(echo $?) | |
if [ "$code" != 0 ]; then | |
echo "Please run ./format_repo.sh to fix this pull request's formatting" | |
fi | |
env: | |
BRANCH_NAME: ${{ github.head_ref }} | |
CHANGE_TARGET: ${{ github.base_ref }} |