Skip to content

Commit 29eb63a

Browse files
authored
[lagobot] run cli-tests with DEVBOX_EXAMPLE_TESTS on main or input.run-example-tests (#827)
## Summary The example-tests take too long to run, so they only run if DEVBOX_EXAMPLE_TESTS are enabled. In CICD, we do not run them on regular PRs. We want to run the example-tests on `main` or if the workflow_dispatch has `input.run-example-tests` set to `true` (for debugging) ## How was it tested? Github Action run for this PR: 1. Cli tests ran in 1 min 23 sec https://github.com/jetpack-io/devbox/actions/runs/4515550386/jobs/7952967257 2. I manually did a workflow dispatch with `run-example-tests` enabled. Cli tests ran in 7 min https://github.com/jetpack-io/devbox/actions/runs/4515569436/jobs/7953008609
1 parent 0b15e13 commit 29eb63a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/cli-tests.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
run-mac-tests:
1919
type: boolean
2020
workflow_dispatch:
21+
inputs:
22+
run-example-tests:
23+
type: boolean
2124

2225
permissions:
2326
contents: read
@@ -104,6 +107,8 @@ jobs:
104107
logger: pretty
105108
nix-build-user-count: 4
106109
- name: Run tests
110+
env:
111+
DEVBOX_EXAMPLE_TESTS: "${{ (github.ref == 'refs/heads/main' || inputs.run-example-tests) && 1 || 0 }}"
107112
run: |
108113
go test ./...
109114

0 commit comments

Comments
 (0)