-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (34 loc) · 1.22 KB
/
windows.yml
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
name: Windows
on: [push, pull_request]
jobs:
test:
name: Node ${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x]
os: [windows-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: PostgreSQL Setup
run: |
$pgService = Get-Service -Name postgresql*
Set-Service -InputObject $pgService -Status running -StartupType automatic
Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru
& $env:PGBIN\psql --command="CREATE USER testuser PASSWORD 'testpassword'" --command="\du"
& $env:PGBIN\createdb --owner=testuser testdatabase
$env:PGPASSWORD = 'testpassword'
& $env:PGBIN\psql --username=testuser --host=localhost --list testdatabase
- name: npm install
run: npm i
- name: npm run build
run: npm run build
- name: npm test
run: npm test
env:
TEST_ONLINE: postgresql://testuser:testpassword@localhost:5432/testdatabase