PR template and CodeOwners (#27) #9
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: test | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
jobs: | |
codegen: | |
name: Codegen | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Restore go build cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/go-build | |
key: ${{ runner.os }}-go-build-v1-${{ hashFiles('**/go.mod') }} | |
- name: Setup Golang | |
uses: actions/[email protected] | |
with: | |
go-version: '1.21' | |
- name: Add bins to PATH | |
run: | | |
echo /home/runner/go/bin >> $GITHUB_PATH | |
echo /usr/local/bin >> $GITHUB_PATH | |
- name: Get dependencies | |
run: go mod download | |
- name: Make codegen | |
run: | | |
echo 'GOPATH=/home/runner/go' >> $GITHUB_ENV | |
make -B codegen | |
- name: Ensure nothing changed | |
run: git diff --exit-code |