Fix typeo (#39) #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: ["staging", "main"] | |
pull_request: | |
branches: ["staging"] | |
jobs: | |
test-with-lanterndb: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ['3.8'] | |
node-version: ['20.x'] | |
services: | |
postgres: | |
image: lanterndata/lantern-suite:pg15-v7 | |
env: | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Set up database | |
run: | | |
DATABASE_NAME=db_$(echo "${{ matrix.python }}" | tr '.' '_') | |
PGPASSWORD=postgres psql -h localhost -U postgres -c "CREATE DATABASE $DATABASE_NAME" | |
- name: Install dependencies and test | |
run: | | |
python3 -m venv .venv | |
source .venv/bin/activate | |
python3 -m pip install lantern-client | |
DATABASE_NAME=db_$(echo "${{ matrix.python }}" | tr '.' '_') | |
export DATABASE_URL="postgresql://postgres:postgres@localhost:5432/$DATABASE_NAME" | |
export TEST_IMAGE_EMBEDDING_EXAMPLE_URL=https://lantern.dev/images/home/footer.png | |
npm ci | |
npm run prettier:check | |
npm run lint | |
npm test |