Skip to content

Commit

Permalink
Add GitHub Actions CI
Browse files Browse the repository at this point in the history
Pull Request: #1 (main)
  • Loading branch information
dimikot committed Jan 12, 2024
1 parent 1a04d29 commit b2e737c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "CI Full Run"
on:
pull_request:
branches:
- main
- grok/*/*
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["20.x"]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: docker compose version
- run: npm install
- run: npm run build
- run: npm run lint
- run: npm run test
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ services:
POSTGRES_PASSWORD: postgres
PGDATA: /tmp/postgresql
POSTGRES_INITDB_ARGS: "-c max_connections=1000 -c synchronous_commit=off"
healthcheck:
test: "pg_isready -U postgres"
interval: 1s
timeout: 20s
retries: 10
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": "tsc",
"dev": "tsc --watch --preserveWatchOutput",
"lint": "eslint . --ext .ts --cache --cache-location dist/.eslintcache",
"test": "set -e; docker-compose up --quiet-pull -d; export PGHOST=127.0.0.1 PGPORT=54832 PGDATABASE=postgres PGUSER=postgres PGPASSWORD=postgres; bash ./internal/init-db.sh; jest",
"test": "set -e; docker-compose up --quiet-pull -d --wait; export PGHOST=127.0.0.1 PGPORT=54832 PGDATABASE=postgres PGUSER=postgres PGPASSWORD=postgres; bash ./internal/init-db.sh; jest",
"docs": "rm -rf docs && typedoc --plugin typedoc-plugin-markdown --plugin typedoc-plugin-merge-modules && sed -i '' -E 's#packages/[^/]+/##g' $(find docs -type f -name '*.md')",
"clean": "rm -rf dist node_modules yarn.lock package-lock.json *.log",
"copy-package-to-public-dir": "copy-package-to-public-dir.sh",
Expand Down

0 comments on commit b2e737c

Please sign in to comment.