.dev #1575
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: CI | |
on: | |
push: {} | |
pull_request: {} | |
env: | |
POSTGRES_PSQL_COMMAND: docker exec -i postgres_github_actions psql | |
jobs: | |
build: | |
if: github.event_name == 'push' || github.event.pull_request.base.repo.url != github.event.pull_request.head.repo.url | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:12 | |
env: | |
PGPORT: '5432' | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
--name postgres_github_actions | |
ports: | |
- 5432:5432 | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: check psql | |
run: | | |
echo 'select 123 as test_column \gdesc' | docker exec -i postgres_github_actions psql "postgresql://postgres:postgres@localhost:5432/postgres" -f - | grep 'test_column | integer' | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: corepack enable | |
- run: pnpm install | |
- run: pnpm build | |
- run: pnpm test |