Skip to content

Commit 71a3a18

Browse files
authored
Merge pull request moby#3617 from crazy-max/ci-merge-test-nydus
ci: merge test-nydus job in test one
2 parents add607c + d6b20f1 commit 71a3a18

File tree

1 file changed

+22
-52
lines changed

1 file changed

+22
-52
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,27 @@ jobs:
8787
typ:
8888
- integration
8989
- dockerfile
90+
tags:
91+
- ''
9092
exclude:
9193
- pkg: ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend
9294
typ: dockerfile
9395
include:
9496
- pkg: ./...
9597
skip-integration-tests: 1
9698
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
97111
steps:
98112
-
99113
name: Checkout
@@ -112,75 +126,31 @@ jobs:
112126
driver-opts: image=${{ env.REPO_SLUG_ORIGIN }}
113127
buildkitd-flags: --debug
114128
-
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' }}
116131
run: |
132+
if [ -n "${{ matrix.tags }}" ]; then
133+
TESTFLAGS="${TESTFLAGS} --tags=${{ matrix.tags }}"
134+
export BUILDKITD_TAGS="${{ matrix.tags }}"
135+
fi
117136
if [ -n "${{ matrix.worker }}" ]; then
118137
export TESTFLAGS="${TESTFLAGS} --run=//worker=${{ matrix.worker }}$"
119138
fi
120139
./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
122141
env:
123142
TEST_COVERAGE: 1
124143
TESTPKGS: ${{ matrix.pkg }}
125144
SKIP_INTEGRATION_TESTS: ${{ matrix.skip-integration-tests }}
126145
CACHE_FROM: type=gha,scope=${{ env.CACHE_GHA_SCOPE_IT }} type=gha,scope=${{ env.CACHE_GHA_SCOPE_BINARIES }}
127146
-
128147
name: Upload coverage file
148+
continue-on-error: ${{ matrix.tags == 'nydus' }}
129149
uses: actions/upload-artifact@v3
130150
with:
131151
name: coverage
132152
path: ./coverage
133153

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-
184154
test-os:
185155
runs-on: ${{ matrix.os }}
186156
strategy:

0 commit comments

Comments
 (0)