Skip to content

Commit 2ab0590

Browse files
authored
ci(test): Separate unit tests so they don't rely on integration tests (#910)
1 parent e5e8bac commit 2ab0590

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,18 @@ defaults:
1414
run:
1515
shell: bash
1616
jobs:
17-
test:
17+
unit-test:
18+
runs-on: ubuntu-18.04
19+
name: "unit tests"
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
24+
- name: Unit Tests
25+
working-directory: install
26+
run: find ./ -type f -name "*-test.sh" -exec "./{}" \;
27+
28+
integration-test:
1829
runs-on: ubuntu-18.04
1930
name: "test"
2031
steps:
@@ -39,13 +50,6 @@ jobs:
3950
./install.sh --minimize-downtime
4051
./test.sh
4152
42-
- name: Unit Tests
43-
working-directory: install
44-
run: |
45-
./create-docker-volumes-test.sh
46-
./relay-credentials-test.sh
47-
./geoip-test.sh
48-
4953
- name: Inspect failure
5054
if: failure()
5155
run: |

install/_test_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ setup() {
1818
# Clone the local repo into a temp dir. FWIW `git clone --local` breaks for
1919
# me because it depends on hard-linking, which doesn't work across devices,
2020
# and I happen to have my workspace and /tmp on separate devices.
21-
git clone --depth=1 "file://$(pwd)" "$_SANDBOX"
21+
git -c advice.detachedHead=false clone --depth=1 "file://$(pwd)" "$_SANDBOX"
2222

2323
# Now propagate any local changes from the working copy to the sandbox. This
2424
# provides a pretty nice dev experience: edit the files in the working copy,

0 commit comments

Comments
 (0)