Skip to content

Commit 210cd9a

Browse files
committed
testing with pg and Redis containers
1 parent 267a5e5 commit 210cd9a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Testing CI
22

3-
on: pull_request
3+
on:
4+
- pull_request
5+
- push # not for landing
46

57
jobs:
68
build:
@@ -9,24 +11,33 @@ jobs:
911
strategy:
1012
matrix:
1113
node:
12-
- 14
1314
- 16
1415
- 18
1516
- 19
17+
- 20
1618
os:
1719
- ubuntu-latest
1820

1921
steps:
2022
- uses: actions/checkout@v3
23+
24+
- name: Start docker containers
25+
run: |
26+
docker-compose -f docker-compose.yml up -d pg-example redis-example
27+
sleep 10 # wait for database to be ready
28+
2129
- name: Use Node.js ${{ matrix.node }}
2230
uses: actions/setup-node@v3
2331
with:
2432
node-version: ${{ matrix.node }}
33+
2534
- uses: actions/cache@v3
2635
with:
2736
path: ~/.npm
2837
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2938
restore-keys: |
3039
${{ runner.os }}-node-
40+
3141
- run: npm ci
42+
3243
- run: npm test

0 commit comments

Comments
 (0)