-
-
Notifications
You must be signed in to change notification settings - Fork 220
53 lines (47 loc) · 1.53 KB
/
windows-nodejs.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Windows Node CI
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
env:
CI: true
CONFIRM_DROP: 1
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
steps:
# Force LF line endings - necessary to have prettier not complain
- name: Prepare git
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: "16"
- name: Start Postgres 14
run: |
sc config postgresql-x64-14 start=auto
net start postgresql-x64-14
- name: Setup environment
# Windows postgres auth is 'postgres'/'root' - see
# https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md#postgresql
run: |
cp .env.ci .env
echo "ROOT_DATABASE_URL=postgres://postgres:root@localhost/template1" >> .env
# These all need to be separate steps on Windows because a failure of a
# command doesn't fail the whole job step - see
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
- name: yarn
run: yarn --immutable
- name: setup
run: yarn setup
- name: build
run: yarn build
- name: lint
run: yarn lint
- name: test
run: yarn test --ci
- name: depcheck
run: yarn depcheck