Skip to content

Commit ac393e6

Browse files
committed
Add test pipeline in the github actions
1 parent 29ee532 commit ac393e6

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/build.yml

+37
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,45 @@ env:
99
IMAGE_NAME: ${{ github.repository }}
1010

1111
jobs:
12+
test_api:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
# This is used to complete the identity challenge
18+
# with sigstore/fulcio when running outside of PRs.
19+
id-token: write
20+
21+
services:
22+
postgres:
23+
image: postgres
24+
env:
25+
POSTGRES_USER: test
26+
POSTGRES_PASSWORD: test
27+
POSTGRES_DATABASE: test
28+
POSTGRES_HOST: 127.0.0.1
29+
options: >-
30+
--health-cmd pg_isready
31+
--health-interval 10s
32+
--health-timeout 5s
33+
--health-retries 5
34+
ports:
35+
- 5432:5432
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v3
39+
40+
- name: Use Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: '20.x'
44+
45+
- name: Run integration tests
46+
run: npm run test:integration
47+
1248
build_api:
1349
runs-on: ubuntu-latest
50+
needs: test_api
1451
permissions:
1552
contents: read
1653
packages: write

0 commit comments

Comments
 (0)