Skip to content

Commit

Permalink
Merge pull request #5 from launchableinc/add-no_build_option
Browse files Browse the repository at this point in the history
add no build option
  • Loading branch information
shibuiwilliam authored Feb 14, 2023
2 parents 9d941b2 + 7b23372 commit ad07b43
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/go-test-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,22 @@ jobs:
- name: test
run: cd examples/go && go test -v ./... 2>&1 | go-junit-report -set-exit-code > report.xml
- name: Record build and test results
uses: launchableinc/[email protected]
uses: ./
# uses: launchableinc/[email protected]
with:
build_name: $GITHUB_RUN_ID
report_path: ./examples/go/
test_runner: go-test
source_path: ./examples/go/
if: always()
- name: remove .launchable
run: rm -f .launchable
- name: Record test results without build
uses: ./
# uses: launchableinc/[email protected]
with:
report_path: ./examples/go/
no_build: "true"
test_runner: go-test
source_path: ./examples/go/
if: always()
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ The maximum number of days to collect commits retroactively. Default `30`.

Flag to stop collecting build information from Git Submodules. Default `false`, which means the submodules are collected.

### `no_build`

Flag to record test session without recording build. Default `false`, which means the build is recorded.

### `python_version`

Python version for the Launchable CLI to use. Default is `3.10`. Change this if your workflow requires a specific Python version.
Expand Down
27 changes: 20 additions & 7 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
required: false
description: "Stop collecting build information from Git Submodules. Default False."
default: "false"
no_build:
required: false
description: "Send test session without recording build. Default False."
default: "false"
python_version:
required: false
description: "Python version >= 3.5 <=3.10. Default 3.10"
Expand Down Expand Up @@ -45,15 +49,16 @@ runs:
java-version: 1.8
- id: install
shell: bash
run: pip install "launchable>=1.56.1"
run: pip install "launchable>=1.59.0"
- id: verify
shell: bash
run: |
launchable verify
- id: record_build
shell: bash
if: inputs.no_build != 'true'
run: |
if [ "${{ inputs.no_submodules }}" == 'false' ]; then
if [ "${{ inputs.no_submodules }}" == "false" ]; then
launchable record build \
--name ${{ inputs.build_name }} \
--max-days ${{ inputs.max_days }} \
Expand All @@ -68,8 +73,16 @@ runs:
- id: record_test
shell: bash
run: |
launchable record tests \
--build ${{ inputs.build_name }} \
--allow-test-before-build \
${{ inputs.test_runner }} \
${{ inputs.report_path }}
if [ "${{ inputs.no_build }}" == "true" ]; then
launchable record tests \
--allow-test-before-build \
--no-build \
${{ inputs.test_runner }} \
${{ inputs.report_path }}
else
launchable record tests \
--build ${{ inputs.build_name }} \
--allow-test-before-build \
${{ inputs.test_runner }} \
${{ inputs.report_path }}
fi

0 comments on commit ad07b43

Please sign in to comment.