Skip to content

Commit 74c34c0

Browse files
committed
cicd: update nightly job to work
Signed-off-by: Hank Donnay <[email protected]>
1 parent fca257d commit 74c34c0

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

.github/workflows/nightly-ci.yaml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
name: Integration Tests
2222
needs: ['config']
2323
runs-on: ubuntu-latest
24-
container: quay.io/projectquay/golang:${{ matrix.go }}
2524
env:
2625
POSTGRES_CONNECTION_STRING: "host=clair-db port=5432 user=clair dbname=clair sslmode=disable"
2726
RABBITMQ_CONNECTION_STRING: "amqp://guest:guest@clair-rabbitmq:5672/"
@@ -39,7 +38,7 @@ jobs:
3938
--health-timeout 5s
4039
--health-retries 5
4140
clair-rabbitmq:
42-
image: rabbitmq:3.8.5
41+
image: docker.io/library/rabbitmq:3.8.5
4342
env:
4443
RABBITMQ_VM_MEMORY_HIGH_WATERMARK: "85%"
4544
clair-activemq:
@@ -49,28 +48,42 @@ jobs:
4948
matrix:
5049
go: ${{ fromJSON(needs.config.outputs.go_versions) }}
5150
# Put non-amd64 platforms that should run tests here:
52-
platform: ['linux/arm64', 'linux/ppc64le', 'linux/s390x']
51+
platform: ['arm64', 'ppc64le', 's390x']
5352
steps:
5453
- uses: actions/checkout@v3
55-
- uses: ./.github/actions/go-cache
54+
- uses: actions/cache@v3
55+
id: cache
5656
with:
57-
go: ${{ matrix.go }}
57+
path: |
58+
~/.cache/go-build
59+
~/go/pkg/mod
60+
key: ${{ runner.os }}-${{ matrix.platform }}-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
61+
restore-keys: |
62+
${{ runner.os }}-${{ matrix.platform }}-${{ matrix.go }}-
5863
- name: Set up QEMU
5964
uses: docker/setup-qemu-action@v2
6065
with:
61-
platforms: ${{ matrix.platform }}
62-
- run: >-
66+
platforms: linux/${{ matrix.platform }}
67+
- name: Make directories on cache miss
68+
run: mkdir -p "$(go env GOMODCACHE)" "$(go env GOCACHE)"
69+
if: ${{ ! steps.cache.outputs.cache-hit }}
70+
- name: Run integration tests
71+
run: >-
6372
docker run
6473
--rm
65-
--platform ${{ matrix.platform }}
74+
--network ${{ job.container.network }}
75+
--platform linux/${{ matrix.platform }}
6676
--mount "type=bind,src=$(go env GOMODCACHE),dst=/go/pkg/mod"
77+
--mount "type=bind,src=$(go env GOCACHE),dst=/root/.cache/go-build"
6778
--mount "type=bind,src=$(pwd),dst=/build"
79+
--env POSTGRES_CONNECTION_STRING
80+
--env RABBITMQ_CONNECTION_STRING
81+
--env STOMP_CONNECTION_STRING
6882
-w /build
6983
quay.io/projectquay/golang:${{ matrix.go }}
7084
go test
7185
-tags integration
72-
github.com/quay/claircore/...
73-
./...
86+
$(go list -m github.com/quay/clair{core,}/... | awk '{printf("%s/... ",$1)}')
7487
- uses: actions/upload-artifact@v3
7588
if: failure()
7689
with:

0 commit comments

Comments
 (0)