Skip to content

Commit 6867464

Browse files
committed
Set NGINX_EXE env var in CI workflow
The ohttp-relay integration tests check for the NGINX_EXE environment variable and skip when it is not set. The CI workflow was adding nginx to PATH instead of setting NGINX_EXE, so the tests were silently skipped. Use GITHUB_ENV to set NGINX_EXE to the full binary path so the integration tests run in CI. Closes payjoin#1227
1 parent 3647419 commit 6867464

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/rust.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ jobs:
3131
uses: DeterminateSystems/determinate-nix-action@main
3232
- name: "Use nix cache"
3333
uses: DeterminateSystems/magic-nix-cache-action@main
34-
- name: "Add nginxWithStream to PATH"
34+
- name: "Set NGINX_EXE for integration tests"
3535
run: |
36-
# This is necessary for ohttp-relay integration tests
37-
echo "$(nix build .#nginx-with-stream --print-out-paths --no-link)/bin" >> $GITHUB_PATH
36+
echo "NGINX_EXE=$(nix build .#nginx-with-stream --print-out-paths --no-link)/bin/nginx" >> $GITHUB_ENV
3837
- name: "Use cache"
3938
uses: Swatinem/rust-cache@v2
4039
- name: Run tests
@@ -91,10 +90,9 @@ jobs:
9190
uses: DeterminateSystems/determinate-nix-action@main
9291
- name: "Use nix cache"
9392
uses: DeterminateSystems/magic-nix-cache-action@main
94-
- name: "Add nginxWithStream to PATH"
93+
- name: "Set NGINX_EXE for integration tests"
9594
run: |
96-
# This is necessary for ohttp-relay integration tests
97-
echo "$(nix build .#nginx-with-stream --print-out-paths --no-link)/bin" >> $GITHUB_PATH
95+
echo "NGINX_EXE=$(nix build .#nginx-with-stream --print-out-paths --no-link)/bin/nginx" >> $GITHUB_ENV
9896
- name: "Use cache"
9997
uses: Swatinem/rust-cache@v2
10098
- name: "Install cargo-llvm-cov"

0 commit comments

Comments
 (0)