Skip to content

Commit 6fe5461

Browse files
fix: race conditions (#636)
1 parent 1f0ca57 commit 6fe5461

File tree

16 files changed

+315
-82
lines changed

16 files changed

+315
-82
lines changed

.github/workflows/build.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ jobs:
147147
run: |
148148
make clean test
149149
150+
150151
proxy-test:
151152
name: proxy-test
152153
runs-on: ubuntu-latest
@@ -159,6 +160,36 @@ jobs:
159160
run: |
160161
make clean proxy-test
161162
163+
race-tests:
164+
name: race-test
165+
runs-on: ubuntu-latest
166+
steps:
167+
- uses: actions/checkout@v4
168+
- name: Set up Pact CLI tools
169+
shell: bash
170+
run: |
171+
make tools
172+
173+
- name: Cache Pact CLI tools
174+
id: cache-pact
175+
uses: actions/cache@v4
176+
with:
177+
path: ~/pact
178+
key: ${{ runner.os }}-pact
179+
180+
- name: Run race tests
181+
env:
182+
SNYK_TOKEN: ${{secrets.SNYK_TOKEN }}
183+
run: |
184+
export PATH=$PATH:~/pact/bin
185+
186+
# this is required to be able to test the clipboard
187+
export DISPLAY=:99
188+
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
189+
sudo apt-get install -y xsel xclip wl-clipboard
190+
191+
make clean race-test
192+
162193
update-licenses:
163194
name: update licenses
164195
needs: [unit-tests]

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ race-test:
7373
@echo "==> Running integration tests with race-detector..."
7474
@mkdir -p $(BUILD_DIR)
7575
@export INTEG_TESTS=true
76+
@export SMOKE_TESTS=true
7677
@go test $(NOCACHE) $(TIMEOUT) -race -failfast ./...
7778

7879
.PHONY: proxy-test

0 commit comments

Comments
 (0)