-
Notifications
You must be signed in to change notification settings - Fork 71
52 lines (48 loc) · 1.82 KB
/
integration-test.yaml
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
name: Integration tests with Logstash instanse
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
timeout-minutes: 2
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 19.x, 20.x]
winston-version: [2x, 3x]
steps:
- uses: actions/checkout@v3
- name: Start containers for Winston ${{ matrix.winston-version }}
working-directory: ./test-bench/logstash/
run: docker-compose -f "docker-compose.yml" up -d
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install base project deps
run: npm install
- name: Build base project
run: npm run build
- name: Install dependencies for test case
working-directory: ./test-bench/winston-${{ matrix.winston-version }}
run: npm install
- name: Wait for Logstash
working-directory: ./test-bench/logstash/
run: |
npx --yes wait-on --timeout 3000 --verbose tcp:localhost:9777 &&
npx --yes wait-on --timeout 3000 --verbose tcp:localhost:9888 &&
npx --yes wait-on --timeout 3000 --verbose tcp:localhost:9999 &&
npx --yes wait-on --timeout 3000 --verbose tcp:localhost:9777 &&
npx --yes wait-on --timeout 3000 --verbose tcp:localhost:9888 &&
npx --yes wait-on --timeout 3000 --verbose tcp:localhost:9999 &&
docker-compose logs --no-color logstash
- run: npm test
working-directory: ./test-bench/winston-${{ matrix.winston-version }}
- name: Stop containers
working-directory: ./test-bench/logstash/
if: always()
run: |
docker-compose logs --no-color logstash &&
docker-compose -f "docker-compose.yml" down