-
Notifications
You must be signed in to change notification settings - Fork 155
89 lines (69 loc) · 2.79 KB
/
tests.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
name: Tests
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
test-linux:
name: Test on Linux
runs-on: ubuntu-latest
env:
GO_VERSION: oldstable
steps:
- name: Setup /etc/hosts
run: |
echo "127.0.0.1 example.letsencrypt.org" | sudo tee -a /etc/hosts
echo "127.0.0.1 elpmaxe.letsencrypt.org" | sudo tee -a /etc/hosts
# https://github.com/marketplace/actions/checkout
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
# https://github.com/marketplace/actions/setup-go-environment
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: apt install
run: sudo apt-get install snapd python3-acme python3-josepy
- name: snap install
run: sudo snap install core && sudo snap refresh core
- name: snap install certbot
run: sudo snap install --classic certbot && sudo ln -s /snap/bin/certbot /usr/bin/certbot
- name: go install tools
run: go install golang.org/x/tools/cmd/cover@latest
- name: go install goveralls
run: go install github.com/mattn/goveralls@latest
# Clone Boulder because the go.mod contains `exclude` directives,
# and so the load-generator cannot be installed with a simple `go install`
- name: Checkout Boulder repository (load-generator)
uses: actions/checkout@v4
with:
repository: letsencrypt/boulder
path: boulder
ref: release-2024-02-20
- name: install load-generator
working-directory: ./boulder/test/load-generator
run: go install
- name: go install
run: go install -v -race ./...
- name: launch pebble
run: GORACE="halt_on_error=1" PEBBLE_WFE_NONCEREJECT=0 pebble &
# Run project unit tests (with the race detector enabled and atomic coverage profile collection)
- name: unittests
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
# # Upload collected coverage profile to goveralls
# - name: goveralls
# run: goveralls -coverprofile=coverage.out -service=github
# Perform a test issuance with chisel2.py
- name: chisel
run: 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.
- name: load-generator
run: load-generator -config ./test/config/load-generator-config.json > /dev/null