Skip to content

Commit

Permalink
Update semaphore.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TaktischerSpeck authored Oct 20, 2023
1 parent aed32d1 commit 0ff0ff0
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/semaphore.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1 @@
version: v1.0
name: Go project example
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804

blocks:
- name: Build project
task:
jobs:
- name: Get Go packages
commands:
- checkout
- sem-version go 1.12
- go get github.com/lib/pq
- go build webServer.go
- mkdir bin
- mv webServer bin
- cache store $(checksum webServer.go) bin

- name: Check code style
task:
jobs:
- name: gofmt
commands:
- checkout
- sem-version go 1.12
- yes | sudo apt install gccgo-go
- gofmt webServer.go | diff --ignore-tab-expansion webServer.go -

- name: Smoke tests
task:
jobs:
- name: go test
commands:
- checkout
- sem-version go 1.12
- sem-service start postgres
- psql -p 5432 -h localhost -U postgres -c "CREATE DATABASE s2"
- go get github.com/lib/pq
- go test ./... -v

- name: Test Web Server
commands:
- checkout
- sem-version go 1.12
- cache restore $(checksum webServer.go)
- ./bin/webServer 8001 &
- curl --silent localhost:8001/time | grep "The current time is"

0 comments on commit 0ff0ff0

Please sign in to comment.