Skip to content

Commit

Permalink
ci: add unit test build (#2283)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwotherspoon authored Aug 2, 2024
1 parent 5ff61de commit a25615b
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
name: Authenticate to Google Cloud
uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3
with:
workload_identity_provider: ${{ secrets.PROVIDER_NAME }}
service_account: ${{ secrets.SERVICE_ACCOUNT }}
workload_identity_provider: ${{ vars.PROVIDER_NAME }}
service_account: ${{ vars.SERVICE_ACCOUNT }}
access_token_lifetime: 600s

- name: Set up Cloud SDK
Expand Down Expand Up @@ -152,3 +152,19 @@ jobs:
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot-darwin-amd64 -o flakybot -s -L
chmod +x ./flakybot
./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
unit:
name: unit tests
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: 1.22
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Run tests
# specifying bash shell ensures a failure in a piped process isn't lost by using `set -eo pipefail`
shell: bash
run: |
go test -v -race -short ./...

0 comments on commit a25615b

Please sign in to comment.