-
-
Notifications
You must be signed in to change notification settings - Fork 10
145 lines (127 loc) · 3.72 KB
/
acceptance-testing-e2e.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Acceptance testing (using e2e framework and examples)
on:
push:
branches:
- master
pull_request:
branches:
- master
types: [opened, synchronize, closed]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out slimtoolkit/slim repo
uses: actions/checkout@v4.2.2
- name: Set up Go development environment
uses: actions/setup-go@v5.0.2
with:
go-version: '1.21.4'
- name: Build Slim (multi-arch)
run: make build
- name: Upload Slim app binaries (Linux, amd64)
uses: actions/upload-artifact@v4.4.3
with:
name: dist_linux
path: dist_linux
retention-days: 1
- name: Upload Slim app binaries (Linux, arm64)
uses: actions/upload-artifact@v4.4.3
with:
name: dist_linux_arm64
path: dist_linux_arm64
retention-days: 1
- name: Upload Slim app binaries (Linux, arm)
uses: actions/upload-artifact@v4.4.3
with:
name: dist_linux_arm
path: dist_linux_arm
retention-days: 1
- name: Upload Slim app binaries (macOS, amd64)
uses: actions/upload-artifact@v4.4.3
with:
name: dist_mac
path: dist_mac
retention-days: 1
# Run sensor tests using the e2e testing framework.
test-sensor-e2e:
needs: build
strategy:
matrix:
os:
# macos runners don't support docker yet
- ubuntu-latest
include:
- os: ubuntu-latest
bin_artifacts: dist_linux
runs-on: ${{ matrix.os }}
steps:
- name: Check out slimtoolkit/slim repo
uses: actions/checkout@v4.2.2
- name: Set up Go development environment
uses: actions/setup-go@v5.0.2
with:
go-version: '1.21.4'
- name: Download Slim app binaries
uses: actions/download-artifact@v4.1.8
with:
name: ${{ matrix.bin_artifacts }}
path: bin
- name: Fix Slim app binaries permissions
run: chmod a+x bin/*
- name: Add Slim bin folder to $PATH
run: echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
- name: Run sensor e2e tests
timeout-minutes: 60
run: make test-e2e-sensor
# Run full-cycle tests (ab)using the slimtoolkit/examples repository.
test-full-e2e:
needs: build
strategy:
matrix:
os:
# macos runners don't support docker yet
- ubuntu-latest
suite:
- compose
- distroless
- dotnet
- elixir
- golang
- haskell
- http-probe
- image-edit
- java
- node
- php
- python
- ruby
- rust
include:
- os: ubuntu-latest
bin_artifacts: dist_linux
runs-on: ${{ matrix.os }}
steps:
- name: Check out slimtoolkit/slim repo
uses: actions/checkout@v4.2.2
- name: Check out slimtoolkit/examples repo
uses: actions/checkout@v4.2.2
with:
repository: slimtoolkit/examples
path: e2e
- name: Download Slim app binaries
uses: actions/download-artifact@v4.1.8
with:
name: ${{ matrix.bin_artifacts }}
path: bin
- name: Fix Slim app binaries permissions
run: chmod a+x bin/*
- name: Add Slim app bin folder to $PATH
run: echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
- name: Run all e2e tests from slimtoolkit/examples
timeout-minutes: 60
run: |
export DSLIM_LOG_LEVEL=debug
export DSLIM_SHOW_CLOGS=1
export DSLIM_EXAMPLES_DIR=e2e
make test-e2e-${{ matrix.suite }}