1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-25 12:58:59 +02:00

add postgres to github action workflow

This commit is contained in:
Thomas Wilkerling
2025-04-17 14:19:34 +02:00
parent a92f5a2780
commit 7a36389d7a
2 changed files with 28 additions and 4 deletions

View File

@@ -10,9 +10,33 @@ on:
branches: [ "master" ]
jobs:
build:
# Label of the container job
container-job:
# Containers must run in Linux based operating systems
runs-on: debian-latest
# Docker Hub image that `container-job` executes in
container: node:20-bookworm-slim
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DATABASE: postgres
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
@@ -28,4 +52,4 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run test

View File

@@ -7,7 +7,7 @@ FlexSearch v0.8: [Overview and Migration Guide](doc/0.8.0.md)
<h3>Next-Generation full-text search library for Browser and Node.js</h3>
<a target="_blank" href="https://www.npmjs.com/package/flexsearch"><img src="https://img.shields.io/npm/v/flexsearch.svg"></a>
<img src="https://img.shields.io/badge/build-passing-brightgreen">
<a target="_blank" href="https://github.com/nextapps-de/flexsearch/actions"><img src="https://img.shields.io/badge/build-passing-brightgreen"></a>
<img src="https://img.shields.io/badge/coverage-91%25-brightgreen">
<img src="https://img.shields.io/badge/typed-74%25-yellow"><!--<a target="_blank" href="https://github.com/nextapps-de/flexsearch/issues"><img src="https://img.shields.io/github/issues/nextapps-de/flexsearch.svg"></a>-->
<a target="_blank" href="https://github.com/nextapps-de/flexsearch/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/flexsearch.svg"></a>