@@ -90,13 +90,27 @@ jobs:
90
90
typ :
91
91
- integration
92
92
- dockerfile
93
+ tags :
94
+ - ' '
93
95
exclude :
94
96
- pkg : ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend
95
97
typ : dockerfile
96
98
include :
97
99
- pkg : ./...
98
100
skip-integration-tests : 1
99
101
typ : integration gateway
102
+ - pkg : ./client
103
+ worker : containerd
104
+ tags : nydus
105
+ typ : integration
106
+ - pkg : ./client
107
+ worker : oci
108
+ tags : nydus
109
+ typ : integration
110
+ - pkg : ./...
111
+ tags : nydus
112
+ skip-integration-tests : 1
113
+ typ : integration
100
114
steps :
101
115
-
102
116
name : Checkout
@@ -115,75 +129,31 @@ jobs:
115
129
driver-opts : image=${{ env.REPO_SLUG_ORIGIN }}
116
130
buildkitd-flags : --debug
117
131
-
118
- name : Test pkg=${{ matrix.pkg }} ; typ=${{ matrix.typ }} ; skipit=${{ matrix.skip-integration-tests }} ; worker=${{ matrix.worker }}
132
+ name : Test
133
+ continue-on-error : ${{ matrix.tags == 'nydus' }}
119
134
run : |
135
+ if [ -n "${{ matrix.tags }}" ]; then
136
+ TESTFLAGS="${TESTFLAGS} --tags=${{ matrix.tags }}"
137
+ export BUILDKITD_TAGS="${{ matrix.tags }}"
138
+ fi
120
139
if [ -n "${{ matrix.worker }}" ]; then
121
140
export TESTFLAGS="${TESTFLAGS} --run=//worker=${{ matrix.worker }}$"
122
141
fi
123
142
./hack/test ${{ matrix.typ }}
124
- mv ./coverage/coverage.txt ./coverage/coverage-${{ github.job }}-$(echo "${{ matrix.pkg }}-${{ matrix.skip-integration-tests }}-${{ matrix.typ }}-${{ matrix.worker }}" | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]').txt
143
+ mv ./coverage/coverage.txt ./coverage/coverage-${{ github.job }}-$(echo "${{ matrix.pkg }}-${{ matrix.skip-integration-tests }}-${{ matrix.typ }}-${{ matrix.worker }}-${{ matrix.tags }} " | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]').txt
125
144
env :
126
145
TEST_COVERAGE : 1
127
146
TESTPKGS : ${{ matrix.pkg }}
128
147
SKIP_INTEGRATION_TESTS : ${{ matrix.skip-integration-tests }}
129
148
CACHE_FROM : type=gha,scope=${{ env.CACHE_GHA_SCOPE_IT }} type=gha,scope=${{ env.CACHE_GHA_SCOPE_BINARIES }}
130
149
-
131
150
name : Upload coverage file
151
+ continue-on-error : ${{ matrix.tags == 'nydus' }}
132
152
uses : actions/upload-artifact@v3
133
153
with :
134
154
name : coverage
135
155
path : ./coverage
136
156
137
- test-nydus :
138
- runs-on : ubuntu-20.04
139
- needs : [base]
140
- strategy :
141
- fail-fast : false
142
- matrix :
143
- pkg :
144
- - ./client
145
- worker :
146
- - containerd
147
- - oci
148
- typ :
149
- - integration
150
- exclude :
151
- - pkg : ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend
152
- typ : dockerfile
153
- include :
154
- - pkg : ./...
155
- skip-integration-tests : 1
156
- typ : integration
157
- steps :
158
- -
159
- name : Checkout
160
- uses : actions/checkout@v3
161
- -
162
- name : Expose GitHub Runtime
163
- uses : crazy-max/ghaction-github-runtime@v2
164
- -
165
- name : Set up QEMU
166
- uses : docker/setup-qemu-action@v2
167
- -
168
- name : Set up Docker Buildx
169
- uses : docker/setup-buildx-action@v2
170
- with :
171
- version : ${{ env.BUILDX_VERSION }}
172
- driver-opts : image=${{ env.REPO_SLUG_ORIGIN }}
173
- buildkitd-flags : --debug
174
- -
175
- name : Test pkg=${{ matrix.pkg }} ; typ=${{ matrix.typ }} ; skipit=${{ matrix.skip-integration-tests }} ; worker=${{ matrix.worker }}
176
- run : |
177
- if [ -n "${{ matrix.worker }}" ]; then
178
- export TESTFLAGS="${TESTFLAGS} --tags=nydus --run=//worker=${{ matrix.worker }}$"
179
- fi
180
- ./hack/test ${{ matrix.typ }}
181
- env :
182
- BUILDKITD_TAGS : nydus
183
- TESTPKGS : ${{ matrix.pkg }}
184
- SKIP_INTEGRATION_TESTS : ${{ matrix.skip-integration-tests }}
185
- CACHE_FROM : type=gha,scope=${{ env.CACHE_GHA_SCOPE_IT }} type=gha,scope=${{ env.CACHE_GHA_SCOPE_BINARIES }}
186
-
187
157
test-os :
188
158
runs-on : ${{ matrix.os }}
189
159
strategy :
0 commit comments