-
Notifications
You must be signed in to change notification settings - Fork 92
49 lines (47 loc) · 1.46 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 "you@example.com"
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