Skip to content

Commit

Permalink
Update workflows to use K6_BROWSER_HEADLESS
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Jun 2, 2023
1 parent 1207e02 commit 6ffa156
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Run E2E tests
run: |
set -x
export XK6_HEADLESS=true
export K6_BROWSER_HEADLESS=true
for f in examples/*.js; do
./k6extension run "$f"
done
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
args[1]="1"
export GOMAXPROCS=1
fi
export XK6_HEADLESS=true
export K6_BROWSER_HEADLESS=true
go test "${args[@]}" -timeout 5m ./...
test-tip:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
go version
export GOMAXPROCS=2
args=("-p" "2" "-race")
export XK6_HEADLESS=true
export K6_BROWSER_HEADLESS=true
go test "${args[@]}" -timeout 5m ./...
test-current-cov:
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
args[1]="1"
export GOMAXPROCS=1
fi
export XK6_HEADLESS=true
export K6_BROWSER_HEADLESS=true
echo "mode: set" > coverage.txt
for pkg in $(go list ./... | grep -v vendor); do
list=$(go list -test -f '{{ join .Deps "\n"}}' $pkg | grep github.com/grafana/xk6-browser | grep -v vendor || true)
Expand Down Expand Up @@ -156,5 +156,5 @@ jobs:
go get go.k6.io/k6@master
go mod tidy
cat go.mod | grep go.k6.io/k6
export XK6_HEADLESS=true
export K6_BROWSER_HEADLESS=true
go test "${args[@]}" -timeout 5m ./...
2 changes: 1 addition & 1 deletion examples/device_emulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default async function() {
'scale': d => d.deviceScaleFactor === device.deviceScaleFactor,
});

if (!__ENV.XK6_HEADLESS) {
if (!__ENV.K6_BROWSER_HEADLESS) {
sleep(10);
}
} finally {
Expand Down

0 comments on commit 6ffa156

Please sign in to comment.