Added version command to cli #228
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: Postgres End to End Tests | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
postgres-end-to-end-tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: src | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: gw | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
env: | |
cache-name: cache-pnpm-modules | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- | |
- uses: pnpm/[email protected] | |
with: | |
version: 8.6.9 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
cache: "pnpm" | |
cache-dependency-path: src/pnpm-lock.yaml | |
- name: Install dependencies | |
run: pnpm i | |
- name: Build CLI tool | |
run: pnpm build | |
- name: Seed Postgres | |
working-directory: src/packages/end-to-end | |
run: pnpm seed-postgres | |
- name: Import Postgres Chinook Database | |
working-directory: src/packages/end-to-end | |
run: pnpm import-database-postgres | |
- name: Start and Test GW instance | |
working-directory: src/packages/end-to-end | |
timeout-minutes: 2 | |
run: | | |
pnpm start-server & | |
sleep 3 && | |
pnpm test-postgres && | |
killall node | |
env: | |
CI: true | |
DATABASE_HOST: localhost | |
DATABASE_USERNAME: postgres | |
DATABASE_PASSWORD: postgres | |
DATABASE_PORT: 5432 | |
DATABASE_NAME: gw |