Skip to content

Commit 1b20a96

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

1 file changed

Lines changed: 31 additions & 31 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,42 @@ name: Build CI/CD
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches:
6+
- main
77

88
jobs:
99
test:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v4
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
1414

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

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

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

2626
compile:
27-
runs-on: ubuntu-latest
28-
needs: test
29-
if: success()
30-
steps:
31-
- name: Checkout code
32-
uses: actions/checkout@v4
33-
34-
- name: Set up Go
35-
uses: actions/setup-go@v5
36-
with:
37-
go-version: '1.22'
38-
39-
- name: Install dependencies
40-
run: go mod download
41-
42-
- name: Compile binary
43-
run: go build -o myapp
27+
runs-on: ubuntu-latest
28+
needs: test
29+
if: success()
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Set up Go
35+
uses: actions/setup-go@v5
36+
with:
37+
go-version: '1.22'
38+
39+
- name: Install dependencies
40+
run: go mod download
41+
42+
- name: Compile binary
43+
run: go build -o myapp

0 commit comments

Comments
 (0)