Skip to content

Commit

Permalink
Separate build and test steps by adding an input
Browse files Browse the repository at this point in the history
  • Loading branch information
iwdgo committed Jan 19, 2023
1 parent 57579aa commit 1cd7a77
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ Usage with bash:
```
- name: Build Go from source
uses: iwdgo/gotip-build@v0.0.1
uses: iwdgo/gotip-build@v0.1.0
id: gotip
with:
test_build: true
```

Expand Down
19 changes: 14 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
name: 'Build Go from source'
description: 'build and test go on tip'

inputs:
test_build:
description: 'When set to true, all tests of build are executed'
required: false
default: 'true'
runs:
using: "composite"
steps:
- name: Clone master of go
shell: bash
run: |
git clone --depth=1 --branch master --single-branch --no-tags https://go.googlesource.com/go
run: git clone --depth=1 --branch master --single-branch --no-tags https://go.googlesource.com/go
- name: Build
shell: bash
run: |
cd go/src
export GOROOT_BOOTSTRAP=$(go env GOROOT)
sh ./all.bash
./make.bash --no-banner
../bin/go version
- name: Test
shell: bash
if: ${{ inputs.test_build == 'true' }}
run: |
cd go/src
./run.bash --no-rebuild
branding:
icon: crosshair
Expand Down

0 comments on commit 1cd7a77

Please sign in to comment.