-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (87 loc) · 2.78 KB
/
run-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
102
103
104
105
106
107
name: Path tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
linter:
name: Run golangci-lint
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.22.3"
- name: Setup Git Authentication
run: |
git config --global url."https://${{ github.token }}:[email protected]/".insteadOf "https://github.com/"
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout 10m --verbose
unit-testing:
name: Run unit tests
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22.3"
- name: Setup Git Authentication
run: |
git config --global url."https://${{ github.token }}:[email protected]/".insteadOf "https://github.com/"
- name: Run unit tests
run: CGO_ENABLED=0 go test ./... -short
test-docker-build:
name: Verify Docker image builds successfully
runs-on: "ubuntu-22.04"
steps:
- uses: docker/build-push-action@v2
with:
build-args: |
IMAGE_TAG=test
GITHUB_TOKEN=${{ github.token }}
push: false
load: true
tags: test-build
e2e-testing-morse:
name: Run Morse E2E Tests
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22.3"
- name: copy Morse E2E config
run: make prepare_morse_e2e_config
- name: update Morse E2E config from secrets
env:
MORSE_GATEWAY_SIGNING_KEY: ${{ secrets.MORSE_GATEWAY_SIGNING_KEY }}
MORSE_FULLNODE_URL: ${{ secrets.MORSE_FULLNODE_URL }}
MORSE_AATS: ${{ secrets.MORSE_AATS }}
run: ./e2e/scripts/update_morse_config_from_secrets.sh
- name: Run Morse E2E Tests
run: make test_e2e_morse_relay
e2e-testing-shannon:
name: Run Shannon E2E Tests
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22.3"
- name: copy Shannon E2E config
run: make prepare_shannon_e2e_config
- name: update Shannon E2E config from secrets
env:
SHANNON_GATEWAY_PRIVATE_KEY: ${{ secrets.SHANNON_GATEWAY_PRIVATE_KEY }}
SHANNON_OWNED_APPS_PRIVATE_KEYS: ${{ secrets.SHANNON_OWNED_APPS_PRIVATE_KEYS}}
run: ./e2e/scripts/update_shannon_config_from_secrets.sh
- name: Run Shannon E2E Tests
run: make test_e2e_shannon_relay