forked from 0xPolygon/polygon-edge
-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (53 loc) · 2.06 KB
/
e2e-polybft-test.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
---
name: E2E PolyBFT Tests
on: # yamllint disable-line rule:truthy
workflow_call:
outputs:
workflow_output:
description: E2E PolyBFT Tests output
value: ${{ jobs.e2e_polybft.outputs.e2e_polybft_output_failure }}
jobs:
e2e_polybft:
name: Run E2E PolyBFT Tests
runs-on: ubuntu-latest
env:
E2E_TESTS: true
E2E_LOGS: true
CI_VERBOSE: true
outputs:
e2e_polybft_output_failure: ${{ steps.run_e2e_polybft_failure.outputs.test_output }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install Go
uses: actions/[email protected]
with:
go-version: ${{ vars.GOLANG_VERSION }}
check-latest: true
- name: Generate OpenSSL certificate
run: openssl req -x509 -out localhost.crt -keyout localhost.key -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' -extensions EXT -config <(printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
- name: Copy certificate key
run: sudo cp localhost.key /etc/ssl/private/localhost.key
- name: Copy certificate itself
run: sudo cp localhost.crt /usr/local/share/ca-certificates/localhost.crt
- name: Add certificate to trusted list
run: sudo update-ca-certificates
- name: Update certificate key folder permissions
run: sudo chmod -R 755 /etc/ssl/private
- name: Update certificate key file permissions
run: sudo chmod 644 /etc/ssl/private/localhost.key
- name: Check certificate key permissions
run: ls -l /etc/ssl/private/localhost.key
- name: Run tests
run: make test-e2e-polybft
- name: Run tests failed
if: failure()
id: run_e2e_polybft_failure
run: echo "test_output=false" >> $GITHUB_OUTPUT
- name: Archive test logs
if: always()
uses: actions/[email protected]
with:
name: e2e-polybft-logs
path: e2e-logs-*/
retention-days: 30