-
Notifications
You must be signed in to change notification settings - Fork 156
101 lines (101 loc) · 3.67 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
90
91
92
93
94
95
96
97
98
99
100
101
name: Tests
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
certbot-linux:
name: Run Certbot tests on Linux
runs-on: ubuntu-latest
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
# https://github.com/marketplace/actions/setup-go-environment
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install packages
run: sudo apt-get install snapd python3-acme python3-josepy
- name: Setup snap
run: sudo snap install core && sudo snap refresh core
- name: Install certbot
run: sudo snap install --classic certbot && sudo ln -s /snap/bin/certbot /usr/bin/certbot
- name: go install commands
run: go install -v -race ./cmd/...
- name: launch pebble
run: GORACE="halt_on_error=1" PEBBLE_WFE_NONCEREJECT=0 pebble &
# 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
eggsampler-linux:
name: Run eggsampler/acme tests on Linux
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: go install commands
run: go install -v -race ./cmd/...
- name: launch pebble
run: GORACE="halt_on_error=1" PEBBLE_WFE_NONCEREJECT=0 pebble -dnsserver localhost:8053 &
- name: launch challtestsrv for integration tests
run: pebble-challtestsrv &
- name: run eggsampler/acme tests
env:
PEBBLE_PATH: ${{ github.workspace }}
run: |
git clone https://github.com/eggsampler/acme.git /tmp/eggsampler-acme
cd /tmp/eggsampler-acme && make test
lego-eab-linux:
name: Test lego with EAB
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install lego cli
run: go install github.com/go-acme/lego/v4/cmd/lego@latest
- name: go install commands
run: go install -v ./cmd/...
- name: launch pebble
run: |
GORACE="halt_on_error=1" PEBBLE_VA_ALWAYS_VALID=1 \
pebble -config test/config/pebble-config-external-account-bindings.json &
- run: |
LEGO_CA_CERTIFICATES=./test/certs/pebble.minica.pem \
lego --accept-tos \
--server=https://localhost:14000/dir \
--email="[email protected]" \
--domains=example.letsencrypt.org \
--eab \
--kid kid-3 \
--hmac=HjudV5qnbreN-n9WyFSH-t4HXuEx_XFen45zuxY-G1h6fr74V3cUM_dVlwQZBWmc \
--http --http.port=:5002 \
run
go-linux:
name: Run Go tests on Linux
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
# Run project unit tests (with the race detector enabled and atomic coverage profile collection)
- name: unittests
run: go test -v -race -covermode=atomic -coverprofile=profile.cov ./...
# Upload collected coverage profile to goveralls
- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov