Skip to content

Commit 352474e

Browse files
committed
Update example
1 parent 07b6eb3 commit 352474e

File tree

2 files changed

+14
-42
lines changed

2 files changed

+14
-42
lines changed

.github/workflows/go-test-example.yaml

+12-13
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,32 @@ on:
77
branches: [main]
88

99
env:
10-
LAUNCHABLE_DEBUG: 1
11-
LAUNCHABLE_REPORT_ERROR: 1
12-
LAUNCHABLE_ORGANIZATION: "launchableinc"
13-
LAUNCHABLE_WORKSPACE: "rocket-car-gotest"
14-
EXPERIMENTAL_GITHUB_OIDC_TOKEN_AUTH: 1
15-
16-
permissions:
17-
id-token: write
18-
contents: read
10+
LAUNCHABLE_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN }}
1911

2012
jobs:
2113
tests:
2214
runs-on: ubuntu-latest
2315
steps:
24-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v2
2517
- name: Set up Go
26-
uses: actions/setup-go@v4
18+
uses: actions/setup-go@v2
2719
with:
2820
go-version: 1.18
2921
- name: Clone go-test example
3022
run: git clone https://github.com/launchableinc/examples.git
3123
- name: Install dependencies
3224
run: go install github.com/jstemmer/go-junit-report@latest
33-
- name: Record build
25+
- name: Record build action
3426
uses: ./
35-
# uses: launchableinc/[email protected]
3627
with:
3728
build_name: $GITHUB_RUN_ID
29+
source_path: ./examples/go/
3830
- name: test
3931
run: cd examples/go && go test -v ./... 2>&1 | go-junit-report -set-exit-code > report.xml
32+
- name: Record test results to build action
33+
uses: launchableinc/[email protected]
34+
with:
35+
build_name: $GITHUB_RUN_ID
36+
report_path: ./examples/go/
37+
test_runner: go-test
38+
if: always()

README.md

+2-29
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,7 @@ By default, we suggest using the [record build and test results action](https://
66

77
However if your code repository/repositories is/are not available in the step where you run tests, you can split up the two steps (record build and record tests).
88

9-
Use this action to record a build, then use the Launchable record tests action to record tests.
10-
11-
```yaml
12-
name: Test
13-
14-
on:
15-
push:
16-
branches: [main]
17-
pull_request:
18-
branches: [main]
19-
20-
env:
21-
LAUNCHABLE_DEBUG: 1
22-
LAUNCHABLE_REPORT_ERROR: 1
23-
LAUNCHABLE_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN }}
24-
25-
jobs:
26-
tests:
27-
runs-on: ubuntu-latest
28-
steps:
29-
- uses: actions/checkout@v3
30-
- name: Record build action
31-
uses: launchableinc/[email protected]
32-
with:
33-
build_name: $GITHUB_RUN_ID
34-
- name: Test
35-
run: <YOUR TEST COMMAND HERE>
36-
```
9+
Use this action to record a build, then use the [Launchable record tests to build action](https://github.com/marketplace/actions/record-test-results-to-build-action) to record tests.
3710

3811
## Example
3912

@@ -67,4 +40,4 @@ Flag to stop collecting build information from Git Submodules. Default `false`,
6740
Python version for the Launchable CLI to use. Default is `3.10`. Change this if your workflow requires a specific Python version.
6841

6942
# License
70-
Launchable data collection actions are licensed under the [Apache license](./LICENSE).
43+
The Launchable record build action is licensed under the [Apache license](./LICENSE).

0 commit comments

Comments
 (0)