Skip to content

Commit c81166d

Browse files
committed
Catch tests that fail when certain environment variables are set
Tests should ideally be isolated from the user's environment.
1 parent 774ade9 commit c81166d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/go.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ jobs:
2222

2323
- name: Run tests
2424
run: go test -race ./...
25+
# catch tests that are not well-isolated from the user's environment
26+
env:
27+
GH_TOKEN: ENVTOKEN
28+
GITHUB_TOKEN: ENVTOKEN
29+
GH_ENTERPRISE_TOKEN: ENVTOKEN
30+
GITHUB_ENTERPRISE_TOKEN: ENVTOKEN
31+
GH_REPO: ENVOWNER/ENVREPO
32+
GH_HOST: envhost.net
33+
GH_EDITOR: env-editor
34+
GIT_EDITOR: env-editor
35+
VISUAL: env-editor
36+
EDITOR: env-editor
37+
BROWSER: env-browser
38+
DEBUG: 1
39+
GH_PAGER: envpager
40+
PAGER: envpager
41+
GLAMOUR_STYLE: envstyle.json
42+
NO_COLOR: 1
43+
CLICOLOR: 1
44+
CLICOLOR_FORCE: 1
45+
GH_NO_UPDATE_NOTIFIER: 1
2546

2647
- name: Build
2748
run: go build -v ./cmd/gh

0 commit comments

Comments
 (0)