Skip to content

Commit

Permalink
⚙️ Create a CI workflow to build and test the project
Browse files Browse the repository at this point in the history
  • Loading branch information
OussamaM1 committed Mar 21, 2024
1 parent 13ae895 commit 7d4fb01
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,30 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Build
run: go build -v ./...
- name: Verify dependencies
run: go mod verify

- name: Test
run: go test -v ./...
- name: Build
run: go build -v ./...

- name: Run go vet
run: go vet ./...

- name: Install dependencies
run: go install golang.org/x/lint/golint@latest

- name: Run linter
run: golint ./...

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

# Dependency directories
/go.sum
/go.mod

# other files
.env
Expand Down
14 changes: 14 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module github.com/oussamaM1/task

go 1.22

require (
github.com/joho/godotenv v1.5.1
github.com/spf13/cobra v1.8.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)

0 comments on commit 7d4fb01

Please sign in to comment.