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