Skip to content

Commit cb5b3cc

Browse files
committed
Run postgres in containers in each job
Make it possible to run the tests locally
1 parent 32049f8 commit cb5b3cc

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

.github/workflows/test-eql.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ jobs:
3131
postgres-version: [17, 16, 15, 14]
3232

3333
env:
34-
CS_DATABASE__USERNAME: ${USER}
35-
CS_DATABASE__NAME: test
36-
CS_DATABASE__PASSWORD:
37-
CS_DATABASE__PORT: 5432
38-
34+
POSTGRES_VERSION: ${{ matrix.postgres-version }}
3935

4036
steps:
4137
- uses: actions/checkout@v4
@@ -46,15 +42,10 @@ jobs:
4642
install: true # [default: true] run `mise install`
4743
cache: true # [default: true] cache mise using GitHub's cache
4844

49-
- uses: ankane/setup-postgres@v1
50-
with:
51-
postgres-version: ${{ matrix.postgres-version }}
52-
database: ${{ env.CS_DATABASE__NAME }}
53-
45+
- name: Setup database
46+
run: |
47+
mise run postgres:up postgres-${POSTGRES_VERSION} --extra-args "--detach --wait"
5448
5549
- name: Test EQL
5650
run: |
57-
mise run test
58-
59-
60-
51+
mise run --output prefix test

0 commit comments

Comments
 (0)