Version 3.0.0-alpha.3 #399
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: Testing CI | |
on: pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: node:${{ matrix.node }}-alpine | |
strategy: | |
matrix: | |
node: | |
- 18 | |
- 20 | |
- 21 | |
- 22 | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm ci | |
- run: apk add --no-cache postgresql-client git | |
- run: PGPASSWORD=postgres psql -h postgres -U postgres -f db/install.sql | |
- run: PGPASSWORD=marcus psql -h postgres -d metasql -U marcus -f db/structure.sql | |
- run: PGPASSWORD=marcus psql -h postgres -d metasql -U marcus -f db/data.sql | |
- run: npm test | |
env: | |
POSTGRES_HOST: postgres |