forked from vertica/vertica-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (74 loc) · 2.35 KB
/
ci.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
V_HOST: localhost
V_PORT: 5433
V_USER: dbadmin
V_DATABASE: VMart
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
#node: ['8', '10', '12', '14', '16', '17']
#os: [ubuntu-latest, windows-latest, macos-latest]
# let's make it a little bit simple for now
# current minimal version will be 12.
# TODO: investigate the multipe version matrix with single Vertica instance
node: ['12', '13', '14', '15', '16', '17']
os: [ubuntu-latest]
name: Node.js ${{ matrix.node }} (${{ matrix.os }})
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: yarn
- name: build
run: yarn
- name: boostrap
run: yarn lerna bootstrap
- name: Setup Vertica
timeout-minutes: 15
run: |
docker run -d -p 5433:5433 -p 5444:5444 \
--mount type=volume,source=vertica-data,target=/data \
--name vertica_ce \
vertica/vertica-ce:24.1.0-0
echo "Vertica startup ..."
until docker exec vertica_ce test -f /data/vertica/VMart/agent_start.out; do \
echo "..."; \
sleep 3; \
done;
echo "Vertica is up"
docker exec -u dbadmin vertica_ce /opt/vertica/bin/vsql -c "\l"
docker exec -u dbadmin vertica_ce /opt/vertica/bin/vsql -c "select version()"
- name: test-v-connection-string
if: always()
run: |
cd packages/v-connection-string
yarn test
- name: test-v-pool
if: always()
run: |
cd packages/v-pool
yarn test
- name: test-v-protocol
if: always()
run: |
cd packages/v-protocol
yarn test
- name: test-vertica-nodejs
if: always()
run: |
cd packages/vertica-nodejs
yarn test