Skip to content

Commit a9db2e1

Browse files
committed
Debug rate limit
1 parent b3a3b2c commit a9db2e1

File tree

1 file changed

+26
-140
lines changed

1 file changed

+26
-140
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -18,66 +18,38 @@ concurrency:
1818

1919
jobs:
2020
build:
21-
runs-on: ubuntu-latest
22-
steps:
23-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24-
25-
- name: Set up JDK for running Gradle
26-
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
27-
with:
28-
distribution: temurin
29-
java-version: 17
30-
31-
- name: Set up gradle
32-
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
33-
with:
34-
cache-read-only: ${{ github.event_name == 'pull_request' }}
35-
- name: Gradle build and test
36-
run: ./gradlew build -x test
37-
38-
test:
39-
name: test (${{ matrix.test-java-version }})
4021
runs-on: ubuntu-latest
4122
strategy:
4223
matrix:
43-
test-java-version:
24+
dummy1:
25+
- 1
26+
- 2
27+
- 3
28+
- 4
29+
- 5
30+
- 6
31+
- 7
4432
- 8
45-
- 11
46-
- 17
47-
- 21
48-
- 23
33+
- 9
34+
- 10
35+
dummy2:
36+
- 1
37+
- 2
38+
- 3
39+
- 4
40+
- 5
41+
- 6
42+
- 7
43+
- 8
44+
- 9
45+
- 10
4946
fail-fast: false
5047
steps:
51-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52-
53-
- id: setup-test-java
54-
name: Set up JDK ${{ matrix.test-java-version }} for running tests
55-
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
48+
- name: Harden Runner
49+
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
5650
with:
57-
# using zulu because new releases get published quickly
58-
distribution: zulu
59-
java-version: ${{ matrix.test-java-version }}
51+
egress-policy: audit
6052

61-
- name: Set up JDK for running Gradle
62-
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
63-
with:
64-
distribution: temurin
65-
java-version: 17
66-
67-
- name: Set up gradle
68-
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
69-
with:
70-
cache-read-only: ${{ github.event_name == 'pull_request' }}
71-
- name: Gradle test
72-
run: >
73-
./gradlew test
74-
-PtestJavaVersion=${{ matrix.test-java-version }}
75-
-Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }}
76-
-Porg.gradle.java.installations.auto-download=false
77-
78-
integration-test:
79-
runs-on: ubuntu-latest
80-
steps:
8153
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8254

8355
- name: Set up JDK for running Gradle
@@ -90,91 +62,5 @@ jobs:
9062
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
9163
with:
9264
cache-read-only: ${{ github.event_name == 'pull_request' }}
93-
94-
- name: Integration test
95-
run: ./gradlew integrationTest
96-
97-
- name: Save integration test results
98-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
99-
if: always()
100-
with:
101-
name: integration-test-results
102-
path: jmx-metrics/build/reports/tests/integrationTest
103-
104-
markdown-link-check:
105-
uses: ./.github/workflows/reusable-markdown-link-check.yml
106-
107-
markdown-lint-check:
108-
uses: ./.github/workflows/reusable-markdown-lint.yml
109-
110-
misspell-check:
111-
uses: ./.github/workflows/reusable-misspell-check.yml
112-
113-
shell-script-check:
114-
uses: ./.github/workflows/reusable-shell-script-check.yml
115-
116-
publish-snapshots:
117-
# the condition is on the steps below instead of here on the job, because skipping the job
118-
# causes the job to show up as canceled in the GitHub UI which prevents the PR build section
119-
# from collapsing when everything (else) is green
120-
#
121-
# and the name is updated when the steps below are skipped which makes what's happening clearer
122-
# in the GitHub UI
123-
#
124-
# note: the condition below has to be written so that '' is last since it resolves to false
125-
# and so would not short-circuit if used in the second-last position
126-
name: publish-snapshots${{ (github.ref_name != 'main' || github.repository != 'open-telemetry/opentelemetry-java-contrib') && ' (skipped)' || '' }}
127-
needs:
128-
# intentionally not blocking snapshot publishing on markdown-link-check or misspell-check
129-
- build
130-
- integration-test
131-
runs-on: ubuntu-latest
132-
steps:
133-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
134-
135-
- name: Set up JDK for running Gradle
136-
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
137-
with:
138-
distribution: temurin
139-
java-version: 17
140-
141-
- name: Set up gradle
142-
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
143-
# skipping release branches because the versions in those branches are not snapshots
144-
# (also this skips pull requests)
145-
if: ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java-contrib' }}
146-
- name: Build and publish snapshots
147-
if: ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java-contrib' }}
148-
run: ./gradlew assemble publishToSonatype
149-
env:
150-
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
151-
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
152-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
153-
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
154-
155-
required-status-check:
156-
if: (github.event_name == 'pull_request' || github.event_name == 'merge_group') && always()
157-
needs:
158-
- build
159-
- test
160-
- integration-test
161-
- markdown-lint-check
162-
- misspell-check
163-
- shell-script-check
164-
runs-on: ubuntu-latest
165-
steps:
166-
# only the build and test checks are required for release branch PRs in order
167-
# to avoid any unnecessary release branch maintenance (especially for patches)
168-
- if: |
169-
needs.build.result != 'success' ||
170-
needs.test.result != 'success' ||
171-
needs.integration-test.result != 'success' ||
172-
(
173-
!startsWith(github.base_ref, 'release/') &&
174-
(
175-
needs.markdown-lint-check.result != 'success' ||
176-
needs.misspell-check.result != 'success' ||
177-
needs.shell-script-check.result != 'success'
178-
)
179-
)
180-
run: exit 1 # fail
65+
- name: Gradle build and test
66+
run: ./gradlew build -x test

0 commit comments

Comments
 (0)