Skip to content

Commit

Permalink
fix: tests ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gjuchault committed Jan 9, 2025
1 parent a598296 commit 99a883a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/typescript-service-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,37 @@ jobs:
name: ⚡ Tests
runs-on: ubuntu-latest
needs: [dependencies]
services:
postgres:
image: postgres
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: pwd
POSTGRES_DB: db
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "npm"
- run: npm ci
- name: Build environment
run: |
echo "DATABASE_URL=postgres://user:pwd@localhost:${{ job.services.postgres.ports[5432] }}/db" >> $GITHUB_ENV
echo "REDIS_URL=redis://localhost:${{ job.services.redis.ports[6379] }}" >> $GITHUB_ENV
echo "HTTP_COOKIE_SIGNING_SECRET=$(node --run generate-secret)" >> $GITHUB_ENV
- name: ⚡ Tests
run: node --run test:coverage

Expand Down

0 comments on commit 99a883a

Please sign in to comment.