-
Notifications
You must be signed in to change notification settings - Fork 30
78 lines (69 loc) · 2.4 KB
/
test-docs.yml
File metadata and controls
78 lines (69 loc) · 2.4 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Run doc tests
on:
pull_request:
paths-ignore:
- '**/docs/**'
jobs:
setup:
runs-on: ubuntu-latest
outputs:
data-transforms: ${{ steps.filter.outputs.data-transforms }}
envoy-shadowing: ${{ steps.filter.outputs.envoy-shadowing }}
redpanda-migrator: ${{ steps.filter.outputs.redpanda-migrator }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Determine changed paths
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
data-transforms:
- 'data-transforms/**'
envoy-shadowing:
- 'docker-compose/envoy-shadowing/**'
redpanda-migrator:
- 'docker-compose/redpanda-migrator-demo/**'
run-tests:
needs: setup
strategy:
fail-fast: false # Ensure all matrix jobs run to completion even if one fails
matrix:
os: [ubuntu-latest] # Only using Linux for now since macOS takes a long time
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Increase AIO limit for Redpanda
if: needs.setup.outputs.envoy-shadowing == 'true'
run: |
# Redpanda uses Linux AIO. With 6 brokers each needing ~10000 events,
# we exceed the default limit of 65536. Increase it.
if: needs.setup.outputs.redpanda-migrator == 'true'
run: |
# Redpanda uses Linux AIO. Increase limit to support multiple brokers.
sudo sysctl -w fs.aio-max-nr=1048576
- name: Test data transforms
if: needs.setup.outputs.data-transforms == 'true'
run: |
# Run the tests for the data transforms
npm run test-transforms
- name: Test envoy shadowing
if: needs.setup.outputs.envoy-shadowing == 'true'
run: npm run test-envoy-shadowing
- name: Test redpanda migrator
if: needs.setup.outputs.redpanda-migrator == 'true'
run: npm run test-migrator
- name: Upload debug artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: doc-detective-output
path: /home/runner/work/_temp/doc-detective-output.json