-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mrkeksz
committed
Dec 7, 2023
1 parent
fbdecce
commit 571e800
Showing
1 changed file
with
27 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,56 @@ | ||
name: Node.js CI | ||
|
||
on: push | ||
|
||
env: | ||
NODE_ENV: test | ||
HOST_OS: ubuntu-20.04 | ||
GH_VERSION: v4 | ||
CACHE: 'npm' | ||
POSTGRES_PASSWORD: 1234 | ||
POSTGRES_USER: waisy | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ env.HOST_OS }} | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
matrix: | ||
node-version: [ 18.18 ] | ||
postgres-version: [ 16.0 ] | ||
node-version: [18.18] | ||
postgres-version: [16.0] | ||
|
||
services: | ||
postgres: | ||
image: postgres:${{ matrix.postgres-version }} | ||
ports: | ||
- 5431:5432 | ||
env: | ||
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | ||
POSGRES_USER: ${{ env.POSTGRES_USER }} | ||
POSTGRES_PASSWORD: 1234 | ||
POSTGRES_USER: waisy | ||
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 }} | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: ${{ env.CACHE }} | ||
- name: Resolve dependencies | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
- name: Confirm formatting complies with standard | ||
|
||
- name: Check for formatting | ||
run: npm run format:check | ||
- name: Regulate code for linting errors | ||
|
||
- name: Check for linting | ||
run: npm run lint:check | ||
- name: Generate schema for GraphQL | ||
|
||
- name: GraphQL generate schema | ||
run: npm run graphql:generate-schema | ||
- name: Run normal testing coverage | ||
|
||
- name: Run tests | ||
run: npm test | ||
- name: Execute end-to-end testing suite | ||
|
||
- name: Runt e2e tests | ||
run: npm run test:e2e |