Skip to content

node.yml

node.yml #40

Workflow file for this run

name: Node.js CI
on: push
env:
NODE_ENV: test
HOST_OS: ubuntu-20.04
GH_VERSION: v4
CACHE: 'npm'
postgres_env:
POSTGRES_PASSWORD: 1234

Check failure on line 9 in .github/workflows/node.yml

View workflow run for this annotation

GitHub Actions / Node.js CI

Invalid workflow file

The workflow is not valid. .github/workflows/node.yml (Line: 9, Col: 5): A mapping was not expected .github/workflows/node.yml (Line: 14, Col: 14): Unrecognized named-value: 'env'. Located at position 1 within expression: env.HOST_OS
POSTGRES_USER: waisy
jobs:
build:
runs-on: ${{ env.HOST_OS }}
strategy:
matrix:
node-version: [ 18.18 ]
postgres-version: [ 16.0 ]
services:
postgres:
image: postgres:${{ matrix.postgres-version }}
ports:
- 5431:5432
env: ${{ env.postgres_env }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@${{ env.GH_VERSION }}
- name: Set up Node.js environment with matrix version
uses: actions/setup-node@${{ env.GH_VERSION }}
with:
node-version: ${{ matrix.node-version }}
cache: ${{ env.CACHE }}
- name: Resolve dependencies
run: npm ci
- name: Confirm formatting complies with standard
run: npm run format:check
- name: Regulate code for linting errors
run: npm run lint:check
- name: Generate schema for GraphQL
run: npm run graphql:generate-schema
- name: Run normal testing coverage
run: npm test
- name: Execute end-to-end testing suite
run: npm run test:e2e