Skip to content

Commit

Permalink
Merge pull request #2 from bas-kirill/feature/add-ci
Browse files Browse the repository at this point in the history
✨ CI
  • Loading branch information
bas-kirill authored Sep 16, 2023
2 parents cbe7738 + fc6ec5d commit 995ef3c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on: pull_request

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.20.4

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build File Server
run: make build

- name: Start Test
run: make test
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
build:
go build -o cmd/api/file-server cmd/api/main.go
go build -v cmd/api

run:
cd cmd/api; ./rundev.sh

test:
go test -v ./... -coverpkg=./...
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module rest-api-file-server
go 1.20

require (
github.com/gorilla/mux v1.8.0 // indirect
github.com/joho/godotenv v1.5.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
github.com/gorilla/mux v1.8.0
go.uber.org/zap v1.26.0
)

require go.uber.org/multierr v1.11.0 // indirect

0 comments on commit 995ef3c

Please sign in to comment.