Skip to content

Commit 0484251

Browse files
committed
github: set the GOPROXY for all actions that need it
Workaround for expired cert at source of indirect dependency go.opencensus.io/trace The Fedora tests are run using a container again instead of relying on the makefile so we can control the environment.
1 parent 3a33aa4 commit 0484251

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

.github/workflows/gitlab-helper.yml

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ jobs:
1616
prepare:
1717
name: "🔍 Check source preparation and test configs"
1818
runs-on: ubuntu-latest
19+
env:
20+
# workaround for expired cert at source of indirect dependency
21+
# (go.opencensus.io/trace)
22+
GOPROXY: "https://proxy.golang.org|direct"
1923
steps:
2024

2125
- name: Set up Go 1.21

.github/workflows/test-osbuild-composer-integration.yml

+4
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ jobs:
5353
runs-on: ubuntu-latest
5454
container:
5555
image: registry.fedoraproject.org/fedora:latest
56+
env:
57+
# workaround for expired cert at source of indirect dependency
58+
# (go.opencensus.io/trace)
59+
GOPROXY: "https://proxy.golang.org|direct"
5660
outputs:
5761
# Define job outputs
5862
# (see https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/passing-information-between-jobs#example-defining-outputs-for-a-job)

.github/workflows/tests.yml

+41-2
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,39 @@ jobs:
2323
fail-fast: false # if one fails, keep the other(s) running
2424
name: "🛃 Unit tests (Fedora ${{ matrix.fedora_version }})"
2525
runs-on: ubuntu-latest
26-
26+
container: registry.fedoraproject.org/fedora:${{ matrix.fedora_version }}
2727
steps:
2828
- name: Check out code into the Go module directory
2929
uses: actions/checkout@v4
3030
with:
3131
ref: ${{ github.event.pull_request.head.sha }}
3232

33+
- name: Install python3
34+
# The Fedora 41 container doesn't have python3 installed by default
35+
run: dnf -y install python3
36+
37+
- name: Set up repository for pinned osbuild commit
38+
run: ./test/scripts/setup-osbuild-repo
39+
40+
- name: Install test dependencies
41+
run: ./test/scripts/install-dependencies
42+
43+
- name: Mark the working directory as safe for git
44+
run: git config --global --add safe.directory "$(pwd)"
45+
3346
- name: Run unit tests
34-
run: make BASE_CONTAINER_IMAGE_TAG=${{matrix.fedora_version}} gh-action-test
47+
run: go test -race ./...
48+
49+
- name: Run depsolver tests with force-dnf to make sure it's not skipped
50+
run: go test -race ./pkg/dnfjson/... -force-dnf
3551

3652
container-resolver-tests:
3753
name: "🛃 Container resolver tests"
3854
runs-on: ubuntu-latest
55+
env:
56+
# workaround for expired cert at source of indirect dependency
57+
# (go.opencensus.io/trace)
58+
GOPROXY: "https://proxy.golang.org|direct"
3959

4060
steps:
4161
- name: Set up Go 1.21
@@ -76,6 +96,9 @@ jobs:
7696
image: quay.io/centos/centos:${{ matrix.centos_stream.image_tag }}
7797
env:
7898
GOFLAGS: "-tags=exclude_graphdriver_btrfs"
99+
# workaround for expired cert at source of indirect dependency
100+
# (go.opencensus.io/trace)
101+
GOPROXY: "https://proxy.golang.org|direct"
79102

80103
steps:
81104
- name: Install dnf plugins
@@ -114,6 +137,10 @@ jobs:
114137
lint:
115138
name: "⌨ Lint"
116139
runs-on: ubuntu-latest
140+
env:
141+
# workaround for expired cert at source of indirect dependency
142+
# (go.opencensus.io/trace)
143+
GOPROXY: "https://proxy.golang.org|direct"
117144
steps:
118145
- name: Set up Go 1.21
119146
uses: actions/setup-go@v5
@@ -146,6 +173,10 @@ jobs:
146173
shellcheck:
147174
name: "🐚 Shellcheck"
148175
runs-on: ubuntu-latest
176+
env:
177+
# workaround for expired cert at source of indirect dependency
178+
# (go.opencensus.io/trace)
179+
GOPROXY: "https://proxy.golang.org|direct"
149180
steps:
150181
- uses: actions/checkout@v4
151182
with:
@@ -162,6 +193,10 @@ jobs:
162193
python-test:
163194
name: "🐍 pytest (imgtestlib and test scripts)"
164195
runs-on: ubuntu-latest
196+
env:
197+
# workaround for expired cert at source of indirect dependency
198+
# (go.opencensus.io/trace)
199+
GOPROXY: "https://proxy.golang.org|direct"
165200
container:
166201
image: registry.fedoraproject.org/fedora:latest
167202
steps:
@@ -181,6 +216,10 @@ jobs:
181216
python-lint:
182217
name: "🐍 Lint (test scripts)"
183218
runs-on: ubuntu-latest
219+
env:
220+
# workaround for expired cert at source of indirect dependency
221+
# (go.opencensus.io/trace)
222+
GOPROXY: "https://proxy.golang.org|direct"
184223
container:
185224
image: registry.fedoraproject.org/fedora:latest
186225
steps:

0 commit comments

Comments
 (0)