Implements proConnect (WIP) #659
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.js CI | |
on: [push] | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- name: Server install | |
run: npm ci | |
- name: Prettify code | |
uses: creyD/[email protected] | |
with: | |
prettier_options: --write **/*.{tsx,ts,jsx,js,md} | |
only_changed: True | |
build_test: | |
needs: prettier | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.x] | |
services: | |
postgres: | |
image: postgis/postgis | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: maestro | |
ports: | |
- 5432:5432 | |
options: | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
s3: | |
image: adobe/s3mock:3.5.2 | |
ports: | |
- 9090:9090 | |
env: | |
initialBuckets: "maestro" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- name: Server install | |
run: npm ci | |
- name: build | |
run: npm run build | |
env: | |
AUTH_SECRET: abcd1234 | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/maestro | |
NODE_ENV: production | |
S3_ENDPOINT: s3 | |
S3_REGION: region | |
S3_ACCESS_KEY_ID: key | |
S3_SECRET_ACCESS_KEY: secret | |
M2M_BASIC_TOKEN: fakeBasicToken | |
- name: Frontend linter | |
run: npm --prefix frontend run lint | |
- name: Server linter | |
run: npm run lint | |
- name: Frontend tests | |
run: npm --prefix frontend test -- --test-timeout=30000 | |
# - name: Migration tests | |
# run: npm run test:database | |
# env: | |
# AUTH_SECRET: abcd1234 | |
# DATABASE_URL: postgres://postgres:postgres@localhost:5432/maestro | |
# M2M_BASIC_TOKEN: fakeBasicToken | |
- name: Server tests | |
run: npm run test | |
env: | |
AUTH_SECRET: abcd1234 | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/maestro | |
M2M_BASIC_TOKEN: fakeBasicToken |