forked from letsencrypt/pebble
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
89 lines (79 loc) · 3 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
language: go
sudo: true
dist: focal
addons:
hosts:
- example.letsencrypt.org
- elpmaxe.letsencrypt.org
cache:
directories:
- $GOPATH/pkg/mod
go:
- "1.18.x"
services:
- docker
before_install:
# snap for installing cerbot, python3-acme and python3-josepy for chisel2.py
- sudo apt-get install snapd python3-acme python3-josepy
- sudo snap install core
- sudo snap refresh core
- sudo snap install --classic certbot
- sudo ln -s /snap/bin/certbot /usr/bin/certbot
# Override the base install phase so that the project can be installed using
# `-mod=vendor` to use the vendored dependencies
install:
# Install `golangci-lint` using their installer script
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2
# Install tools without `GO111MODULE` enabled so that we
# don't download Pebble's deps and just put the tools in our
# gobin.
- GO111MODULE=off go get golang.org/x/tools/cmd/cover
- GO111MODULE=off go get github.com/mattn/goveralls
- GO111MODULE=off go get github.com/letsencrypt/boulder/test/load-generator
- go mod tidy
- git diff --exit-code go.mod
- git diff --exit-code go.sum
- go mod download
- go mod vendor
- git diff --exit-code vendor/
- go install -v -race -mod=vendor ./...
- GOOS=darwin GOARCH=arm64 go install -v -mod=vendor ./...
before_script:
- GORACE="halt_on_error=1" PEBBLE_WFE_NONCEREJECT=0 pebble &
script:
# Vet Go source code using the linter config (see .golang-ci.yml)
- golangci-lint run
# Run project unit tests (with the race detector enabled and atomic
# coverage profile collection)
- go test -mod=vendor -v -race -covermode=atomic -coverprofile=coverage.out ./...
# Upload collected coverage profile to goveralls
- goveralls -coverprofile=coverage.out -service=travis-ci
# Perform a test issuance with chisel2.py
- REQUESTS_CA_BUNDLE=./test/certs/pebble.minica.pem python ./test/chisel2.py example.letsencrypt.org elpmaxe.letsencrypt.org
# Run the load-generator briefly - note, because Pebble isn't using the
# load-generator's mock DNS server none of the issuances will succeed. This
# step is performed just to shake out data races with concurrent requests.
- load-generator -config ./test/config/load-generator-config.json > /dev/null
before_deploy:
- mkdir -p deploy
- cp $(go env GOPATH)/bin/pebble deploy/pebble_linux-amd64
- cp $(go env GOPATH)/bin/pebble-challtestsrv deploy/pebble-challtestsrv_linux-amd64
- cp $(go env GOPATH)/bin/darwin_arm64/pebble deploy/pebble_darwin-arm64
- cp $(go env GOPATH)/bin/darwin_arm64/pebble-challtestsrv deploy/pebble-challtestsrv_darwin-arm64
deploy:
- provider: script
script: bash .ci/publish_linux.sh
skip_cleanup: true
on:
repo: letsencrypt/pebble
tags: true
- provider: releases
name: Pebble $TRAVIS_TAG
api_key: $GITHUB_AUTH_TOKEN
file_glob: true
file: deploy/*
skip_cleanup: true
draft: true
on:
repo: letsencrypt/pebble
tags: true