Skip to content

Commit a061f23

Browse files
committed
Github Actions pipeline instead of Travis
1 parent 6c07f57 commit a061f23

File tree

3 files changed

+51
-43
lines changed

3 files changed

+51
-43
lines changed

.github/workflows/testing.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Testing
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out code
15+
uses: actions/checkout@v2
16+
- name: golangci-lint
17+
uses: golangci/golangci-lint-action@v2
18+
19+
test:
20+
name: Test
21+
runs-on: ubuntu-latest
22+
needs: [ lint ]
23+
24+
services:
25+
postgres:
26+
image: postgres:10
27+
ports:
28+
- "5432"
29+
env:
30+
POSTGRES_USER: goengine
31+
POSTGRES_PASSWORD: goengine
32+
POSTGRES_DB: goengine
33+
options: >-
34+
--health-cmd pg_isready
35+
--health-interval 10s
36+
--health-timeout 5s
37+
--health-retries 5
38+
39+
steps:
40+
- name: Set up Go
41+
uses: actions/setup-go@v2
42+
with:
43+
go-version: ^1.16
44+
- name: Check out code
45+
uses: actions/checkout@v2
46+
- name: Run tests
47+
if: success()
48+
run: go test -cover ./... -coverprofile=coverage.txt -covermode=atomic
49+
env:
50+
POSTGRES_DSN: postgres://goengine:goengine@localhost:${{ job.services.postgres.ports[5432] }}/goengine?sslmode=disable

.travis.yml

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

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hellofresh/goengine
22

3-
go 1.12
3+
go 1.16
44

55
require (
66
github.com/DATA-DOG/go-sqlmock v1.3.0

0 commit comments

Comments
 (0)