Skip to content

Merge branch 'beta' of https://github.com/LEDBrain/Community-Service … #1801

Merge branch 'beta' of https://github.com/LEDBrain/Community-Service …

Merge branch 'beta' of https://github.com/LEDBrain/Community-Service … #1801

Workflow file for this run

name: Development workflow
on:
push:
branches-ignore:
- 'main'
pull_request:
branches: 'beta'
workflow_dispatch:
workflow_call:
jobs:
lint:
name: Lint codebase
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
runs-on: ubuntu-latest
steps:
- name: '☁️ checkout repository'
uses: actions/checkout@v4
- name: '🔧 Setup Node.js'
uses: actions/setup-node@v4
with:
node-version: '20'
- name: '📦 install dependencies'
run: npm ci
- name: '✅ run ESLint'
run: npm run lint:eslint
- name: '✅ run Prettier'
run: npm run lint:prettier
build-project:
name: Build and test project
needs: lint
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
runs-on: ubuntu-latest
env:
PG_USER: postgres
PG_PW: supersecret
PG_DB: community-service-test
DATABASE_URL: postgres://postgres:supersecret@localhost:5432/community-service-test?schema=public
services:
postgres:
image: postgres:14.2
env:
POSTGRES_USER: ${ PG_USER }
POSTGRES_PASSWORD: ${ PG_PW }
POSTGRES_DB: ${ PG_DB }
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: '📄 Log Database URL'
run: echo "Database URL $DATABASE_URL; PG_USER $PG_USER; PG_PW $PG_PW; PG_DB $PG_DB"
- name: '☁️ checkout repository'
uses: actions/checkout@v4
- name: '🔧 Setup Node.js'
uses: actions/setup-node@v4
with:
node-version: '20'
- name: '📦 install dependencies'
run: npm ci
- name: '📂 build'
run: npm run build
# - name: '✅ run API tests'
# run: npm run test:api