Skip to content

Commit d905d84

Browse files
committed
refactor: Use speakeasy test directly
The Speakeasy maintained GHA for testing does not actually run tests unless `.speakeasy/gen.yaml` or `.speakeasy/workflow.yaml` are modified (making the test job pretty unreliable). This is as of 2025-06-04. Replace the workflow generated by `speakeasy config tests` with a simpler workflow that actually runs the tests.
1 parent 36db8e8 commit d905d84

File tree

2 files changed

+43
-26
lines changed

2 files changed

+43
-26
lines changed

.github/workflows/sdk_test.yaml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/test.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
# NOTE: when ran from a fork, the secrets will not be available -- just skip the
13+
# job instead of failing
14+
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch'
15+
16+
env:
17+
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up mise
23+
uses: jdx/mise-action@v2
24+
with:
25+
cache: true
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Setup Speakeasy CLI
30+
uses: gleanwork/open-api/.github/actions/speakeasy-setup@main
31+
with:
32+
github-token: ${{ secrets.GITHUB_TOKEN }}
33+
34+
# run the glean target specified in .speakeasy/workflow.yaml
35+
- run: speakeasy test --target glean
36+
37+
- name: Publish Test Results
38+
uses: dorny/test-reporter@v1
39+
if: always()
40+
with:
41+
name: Speakeasy Tests
42+
path: './.speakeasy/reports/tests.xml'
43+
reporter: java-junit

0 commit comments

Comments
 (0)