-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
112 lines (101 loc) · 3.38 KB
/
.travis.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
## Trivial Tickets Ticketsystem
## Copyright (C) 2019 The Contributors
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
##
## Ticketsystem Trivial Tickets
##
## Matriculation numbers: 3040018, 6694964, 3478222
## Lecture: Programmieren II, INF16B
## Lecturer: Herr Prof. Dr. Helmut Neemann
## Institute: Duale Hochschule Baden-Württemberg Mosbach
##
## ---------------
## Travis Build Configuration
##
## See https://travis-ci.com/mortenterhart/trivial-tickets
## for the current build status.
##
---
language: go
sudo: false
go:
- 1.10.x
- 1.11.x
# Test on Mac OS X, Linux and Windows.
os:
- osx
- linux
- windows
# Add the GOPATH/bin directory to the PATH
# variable so that the installed 'revive'
# executable can be found.
env:
global:
- PATH="${GOPATH}/bin:${PATH}"
# Check the validity of the SSL Certificate
# and private and public Key files.
before_install:
- echo "GOPATH = ${GOPATH}"
- echo "PATH = ${PATH}"
- openssl version
- echo "Verifying SSL Certificate (CERT)"
- openssl x509 -text -noout -in ssl/server.cert
- echo "Verify SSL Certificate Signing Request (CSR)"
- openssl req -text -noout -verify -in ssl/server.csr
- echo "Verifying SSL Private Key (KEY)"
- openssl rsa -check -noout -in ssl/server.key
- echo "Verifiying SSL Public Key (PUB.KEY)"
- openssl pkey -inform PEM -pubin -in ssl/server.pub.key -text -noout
- export CERT_MODULUS="$(openssl x509 -noout -modulus
-in ssl/server.cert | openssl md5)"
- export KEY_MODULUS="$(openssl rsa -noout -modulus
-in ssl/server.key | openssl md5)"
- >
[ "${CERT_MODULUS}" == "${KEY_MODULUS}" ] &&
echo "OK: Certificate and Key Moduli are equal" ||
echo "FAIL: Certificate and Key Moduli not matching"
# Install all project and test dependencies and
# a Go code style checker named 'revive'.
install:
- go get -d -t -v ./...
- go get -u -v github.com/mgechev/revive
# Examine the Go code with static analysis tools
# and report code correctness and code style
# warnings and errors.
before_script:
- go vet -all ./...
- revive -config .revive.toml -formatter stylish ./...
# Execute the tests with coverage.
# The following script executes all tests
# of all packages and creates a coverage
# report out of the results. The report is
# written to report.txt. Read more about
# this script and its options on
# https://github.com/mortenterhart/trivial-tickets/wiki/Generating-a-Coverage-Report.
script:
- ./coverage_report.sh
--verbose
--checks=all
--coverage-profile=coverage.txt
--coverage-mode=atomic
--functions
--output-file=report.txt
--preserve-profile
# Output the function coverage report and
# deploy the coverage profile to Codecov.io.
after_success:
- cat report.txt
- bash <(curl -s https://codecov.io/bash)