[pull] master from GoogleCloudPlatform:master #50
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
on: [push, pull_request] | |
jobs: | |
cloudshell_open: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Free disk space | |
run: | | |
docker system prune -a -f | |
sudo rm -rf /usr/local/lib/android | |
df /var/ | |
df -h | |
- uses: actions/checkout@master | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21 | |
- run: git config --global init.defaultBranch main # TODO remove later as git updates to a newer version | |
- run: go mod download | |
- name: Set up git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Your Name" | |
- name: Validate formatting with go fmt | |
run: diff -u <(echo -n) <(gofmt -d -s .) | |
working-directory: ./cmd/cloudshell_open | |
- name: Go tests | |
run: go test -v ./... | |
working-directory: ./cmd/cloudshell_open | |
- name: Build docker image | |
run: docker build -t runbutton . | |
redirector: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21 | |
- run: go mod download | |
working-directory: ./cmd/redirector | |
- name: Validate formatting with go fmt | |
run: diff -u <(echo -n) <(gofmt -d -s .) | |
working-directory: ./cmd/redirector | |
- name: Go tests | |
run: go test -v ./... | |
working-directory: ./cmd/redirector | |
- name: Build docker image | |
run: docker build -t redirector . | |
working-directory: ./cmd/redirector |