update description #2575
Workflow file for this run
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: Node CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
CI: true | |
PGVERSION: ${{ matrix.postgres-version}} | |
ROOT_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres | |
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/graphileengine_test | |
TEST_PG_URL: postgres://postgres:postgres@localhost:5432/postgraphile_test | |
LDS_TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/lds_test | |
TEST_SIMPLIFY_DATABASE_URL: postgres://postgres:postgres@localhost:5432/pg_simplify_inflectors | |
TERM: xterm | |
FORCE_COLOR: 1 | |
NODE_OPTIONS: "--max-old-space-size=4096" | |
strategy: | |
fail-fast: false | |
matrix: | |
postgres-version: [12] #, 11, 13, 14, 15] | |
node-version: [16.14] #, 18.x] | |
services: | |
postgres: | |
image: postgres:${{ matrix.postgres-version }} | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- "0.0.0.0:5432:5432" | |
# needed because the postgres container does not provide a healthcheck | |
options: | |
--health-cmd pg_isready --health-interval 10s --health-timeout 5s | |
--health-retries 5 --name postgres | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Configure PostgreSQL | |
run: | | |
cat .github/workflows/ci/docker-entrypoint-initdb.d/010-enable_wal.sh | docker exec -i postgres bash | |
cat .github/workflows/ci/docker-entrypoint-initdb.d/020-wal2json.sh | docker exec -i postgres bash | |
cat .github/workflows/ci/docker-entrypoint-initdb.d/030-setup.sh | docker exec -i postgres bash | |
echo "cat /var/lib/postgresql/data/postgresql.conf" | docker exec -i postgres bash | |
docker restart postgres | |
- name: Install pg_dump | |
run: | | |
sudo bash -c "echo deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main >> /etc/apt/sources.list.d/pgdg.list" | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get -yqq install postgresql-client-${{ matrix.postgres-version }} | |
- run: yarn --immutable | |
- name: "Wait for postgres" | |
run: node .github/wait-for-postgres.js | |
- name: "Docker logs postgres" | |
run: docker logs "${{ job.services.postgres.id }}" | |
- name: "Build Code" | |
run: yarn prepack:all | |
- name: "Test Project" | |
run: yarn run pretest && yarn test --ci && yarn run posttest | |
- name: "Check Code Format" | |
run: yarn prettier:check | |
- name: "Lint Code" | |
run: yarn eslint . |