-
Notifications
You must be signed in to change notification settings - Fork 24
60 lines (53 loc) · 1.56 KB
/
nodejs-pgsql16.yml
File metadata and controls
60 lines (53 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js(16,18,20,22,24) w/Postgres 16
on:
push:
branches: [ "main" ]
pull_request:
permissions:
checks: write
contents: read
pull-requests: write
actions: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20, 22, 24]
services:
postgres:
image: kibaes/postgres-logical-replication-dev:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgrespw
POSTGRES_DB: playground
ports:
- "5432:5432"
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Info
run: |
echo "Node version: $(node -v)"
echo "NPM version: $(npm -v)"
echo "NPM cache: $(npm config get cache)"
- name: Install/Build
run: |
npm ci
npm run build
- name: Test
run: npm test
- uses: phoenix-actions/test-reporting@v8
if: success() || failure()
id: test-report
with:
name: JEST Tests (${{ matrix.node-version }}, Postgres 16)
path: junit.xml
reporter: jest-junit
token: ${{ secrets.GITHUB_TOKEN }}