Skip to content

Commit 2e71fc5

Browse files
reakaleekMpdreamz
andauthored
Set up elastic synthetics (#1989)
* Set up elastic synthetics * Update monitor id * Run prettier * Add npm scripts * Fix lint error * Add synthetics test to ci * Add tmp folder * Update .github/workflows/ci.yml Co-authored-by: Martijn Laarman <[email protected]> * Update .github/workflows/ci.yml * Update .github/workflows/ci.yml * Update .github/workflows/ci.yml --------- Co-authored-by: Martijn Laarman <[email protected]>
1 parent d97354e commit 2e71fc5

File tree

6 files changed

+2524
-172
lines changed

6 files changed

+2524
-172
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,38 @@ jobs:
3737

3838
build-api-lambda:
3939
uses: ./.github/workflows/build-api-lambda.yml
40+
4041

42+
synthetics:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v5
46+
47+
- name: Bootstrap Action Workspace
48+
id: bootstrap
49+
uses: ./.github/actions/bootstrap
50+
51+
- name: Install dependencies
52+
working-directory: src/Elastic.Documentation.Site
53+
run: npm ci
54+
55+
- name: Run assembler
56+
run: |
57+
mkdir ../assembler-workspace
58+
cd ../assembler-workspace
59+
dotnet run --project ../docs-builder/src/tooling/docs-builder -- assembler config init --local
60+
dotnet run --project ../docs-builder/src/tooling/docs-builder -- assembler clone -c local --skip-private-repositories
61+
dotnet run --project ../docs-builder/src/tooling/docs-builder -- assembler build -c local --skip-private-repositories
62+
dotnet run --project ../docs-builder/src/tooling/docs-builder -- assembler serve &
63+
64+
- name: Wait for docs
65+
working-directory: src/Elastic.Documentation.Site
66+
run: npx wait-on http-get://localhost:4000/docs
67+
68+
- name: Run synthetics
69+
working-directory: src/Elastic.Documentation.Site
70+
run: npm run synthetics:test
71+
4172
npm:
4273
runs-on: ubuntu-latest
4374
defaults:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,3 +397,6 @@ FodyWeavers.xsd
397397

398398
# JetBrains Rider
399399
*.sln.iml
400+
401+
# Elastic synthetics
402+
.synthetics/

0 commit comments

Comments
 (0)