Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2f8652f

Browse filesBrowse files
committed
Improve testing
1 parent b48e45b commit 2f8652f
Copy full SHA for 2f8652f

File tree

Expand file treeCollapse file tree

3 files changed

+8
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+8
-1
lines changed

‎.github/workflows/test.yml

Copy file name to clipboardExpand all lines: .github/workflows/test.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
- name: Build image
2323
run: |
24-
make build
24+
make build-with-cache
2525
2626
- name: Tests
2727
run: |

‎Makefile

Copy file name to clipboardExpand all lines: Makefile
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ build:
1010
build-quick:
1111
docker build -t $(IMAGE_NAME):$(TAG) .
1212

13+
build-with-cache:
14+
# Used by CI to speed up build and test process
15+
docker pull $(IMAGE_NAME):$(TAG)
16+
docker build -t $(IMAGE_NAME):$(TAG) --cache-from $(IMAGE_NAME):$(TAG) .
17+
1318
test:
1419
bats -r tests/
1520

‎tests/create-user-db.bats

Copy file name to clipboardExpand all lines: tests/create-user-db.bats
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ load test_functions.bash
1616
panubo/postgres-toolbox psql -- -c 'SELECT current_database();'
1717
diag "${output}"
1818
[[ "${status}" -eq 0 ]]
19+
# check the output of the second last line
20+
[[ "${lines[-2]}" = " myuser" ]]
1921
}
2022

2123
# echo "===> Test create-user-db command"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.