Skip to content

Commit dbafed4

Browse files
author
student
committed
Add test step to workflow
1 parent 1b20a96 commit dbafed4

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
name: Build CI/CD
22

33
on:
4-
push:
4+
push:
55
branches:
66
- main
77

88
jobs:
9-
test:
9+
test:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v4
1414

1515
- name: Set up Go
16-
uses: actions/setup-go@v5
17-
with:
18-
go-version: '1.22'
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: '1.22'
1919

2020
- name: Install dependencies
21-
run: go mod download
21+
run: go mod download
2222

2323
- name: Run tests
24-
run: go test ./...
24+
run: go test ./...
2525

26-
compile:
26+
compile:
2727
runs-on: ubuntu-latest
2828
needs: test
2929
if: success()
3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v4
3333

3434
- name: Set up Go
35-
uses: actions/setup-go@v5
36-
with:
37-
go-version: '1.22'
35+
uses: actions/setup-go@v5
36+
with:
37+
go-version: '1.22'
3838

3939
- name: Install dependencies
40-
run: go mod download
40+
run: go mod download
4141

4242
- name: Compile binary
43-
run: go build -o myapp
43+
run: go build -o myapp

0 commit comments

Comments
 (0)