Skip to content

Commit 2903a6f

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 2903a6f

File tree

3 files changed

+53
-2
lines changed

3 files changed

+53
-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

+45-2
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,43 @@ 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 }}
27+
env:
28+
# workaround for expired cert at source of indirect dependency
29+
# (go.opencensus.io/trace)
30+
GOPROXY: "https://proxy.golang.org|direct"
2731
steps:
2832
- name: Check out code into the Go module directory
2933
uses: actions/checkout@v4
3034
with:
3135
ref: ${{ github.event.pull_request.head.sha }}
3236

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

3656
container-resolver-tests:
3757
name: "🛃 Container resolver tests"
3858
runs-on: ubuntu-latest
59+
env:
60+
# workaround for expired cert at source of indirect dependency
61+
# (go.opencensus.io/trace)
62+
GOPROXY: "https://proxy.golang.org|direct"
3963

4064
steps:
4165
- name: Set up Go 1.21
@@ -76,6 +100,9 @@ jobs:
76100
image: quay.io/centos/centos:${{ matrix.centos_stream.image_tag }}
77101
env:
78102
GOFLAGS: "-tags=exclude_graphdriver_btrfs"
103+
# workaround for expired cert at source of indirect dependency
104+
# (go.opencensus.io/trace)
105+
GOPROXY: "https://proxy.golang.org|direct"
79106

80107
steps:
81108
- name: Install dnf plugins
@@ -114,6 +141,10 @@ jobs:
114141
lint:
115142
name: "⌨ Lint"
116143
runs-on: ubuntu-latest
144+
env:
145+
# workaround for expired cert at source of indirect dependency
146+
# (go.opencensus.io/trace)
147+
GOPROXY: "https://proxy.golang.org|direct"
117148
steps:
118149
- name: Set up Go 1.21
119150
uses: actions/setup-go@v5
@@ -146,6 +177,10 @@ jobs:
146177
shellcheck:
147178
name: "🐚 Shellcheck"
148179
runs-on: ubuntu-latest
180+
env:
181+
# workaround for expired cert at source of indirect dependency
182+
# (go.opencensus.io/trace)
183+
GOPROXY: "https://proxy.golang.org|direct"
149184
steps:
150185
- uses: actions/checkout@v4
151186
with:
@@ -162,6 +197,10 @@ jobs:
162197
python-test:
163198
name: "🐍 pytest (imgtestlib and test scripts)"
164199
runs-on: ubuntu-latest
200+
env:
201+
# workaround for expired cert at source of indirect dependency
202+
# (go.opencensus.io/trace)
203+
GOPROXY: "https://proxy.golang.org|direct"
165204
container:
166205
image: registry.fedoraproject.org/fedora:latest
167206
steps:
@@ -181,6 +220,10 @@ jobs:
181220
python-lint:
182221
name: "🐍 Lint (test scripts)"
183222
runs-on: ubuntu-latest
223+
env:
224+
# workaround for expired cert at source of indirect dependency
225+
# (go.opencensus.io/trace)
226+
GOPROXY: "https://proxy.golang.org|direct"
184227
container:
185228
image: registry.fedoraproject.org/fedora:latest
186229
steps:

0 commit comments

Comments
 (0)