Repository navigation
49 lines (46 loc) · 1.67 KB
/
Copy pathopeninference-java-docs.yml
File metadata and controls
49 lines (46 loc) · 1.67 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
name: OpenInference Java documentation
on:
pull_request:
branches: [main]
paths:
- src/pages/docs/integrations/import/openinference.mdx
- scripts/openinference-java-*
- .github/workflows/openinference-java-docs.yml
permissions:
contents: read
jobs:
native-annotations:
name: Native annotations (JDK ${{ matrix.java }})
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
java: ['17', '21']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Check the documentation contract
run: node --test scripts/openinference-java-page.test.mjs
- name: Prepare released floor and current dependencies
run: |
python -m venv "$RUNNER_TEMP/oi-venv"
"$RUNNER_TEMP/oi-venv/bin/python" -I -m pip install opentelemetry-proto==1.38.0
"$RUNNER_TEMP/oi-venv/bin/python" -I scripts/openinference-java-wire.py \
--work "$RUNNER_TEMP/oi-wire" --java-home "$JAVA_HOME" --prepare
- name: Execute documentation and annotation contracts with loopback networking only
run: |
sudo --preserve-env=JAVA_HOME,RUNNER_TEMP env PATH="$PATH" unshare --net sh -ec '
ip link set lo up
"$RUNNER_TEMP/oi-venv/bin/python" -I scripts/openinference-java-wire.py \
--work "$RUNNER_TEMP/oi-wire" --java-home "$JAVA_HOME"
'