Skip to content

Commit c95f6ca

Browse files
committed
Add build to pipeline
1 parent deae4c9 commit c95f6ca

2 files changed

Lines changed: 30 additions & 20 deletions

File tree

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-go@v5
13+
with:
14+
go-version-file: "go.mod"
15+
- name: Check formatting
16+
run: |
17+
gofmt -d .
18+
go vet ./...
19+
- name: Run tests
20+
run: |
21+
go test ./...
22+
- name: Build
23+
run: |
24+
go build ./cmd/pi
25+
- name: Save artifact
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: pi
29+
path: pi
30+

.github/workflows/test.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)