forked from quay/claircore
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (56 loc) · 1.47 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
name: CI
on: [push, pull_request]
jobs:
tidy:
name: Tidy
runs-on: ubuntu-latest
container: docker.io/library/golang:latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Go Tidy
run: go mod tidy
- name: Git Diff
run: git diff --exit-code
build-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.3.5'
- name: mdBook Build
run: mdbook build
tests:
name: Tests
runs-on: ubuntu-latest
container: docker.io/library/golang:${{ matrix.go }}-buster
env:
POSTGRES_CONNECTION_STRING: "host=claircore-db port=5432 user=claircore dbname=claircore sslmode=disable"
services:
claircore-db:
image: postgres:11.5
env:
POSTGRES_USER: "claircore"
POSTGRES_DB: "claircore"
POSTGRES_INITDB_ARGS: "--no-sync"
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
go: ['1.13', '1.14']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: OS Dependencies
run: apt-get update && apt-get install -y tar make gcc
- name: Go Dependencies
run: go mod vendor
- name: Tests
run: make integration