Skip to content

Commit

Permalink
Merge pull request #8 from saantiaguilera/feature/sa/ci_run_samples
Browse files Browse the repository at this point in the history
[CI] Run samples matching main.go
  • Loading branch information
saantiaguilera authored Feb 12, 2020
2 parents 06e6bf5 + 6052d94 commit 78301b8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ jobs:

- name: Test
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...

- name: Run Samples
run: |
shopt -s globstar
for i in examples/**/main.go; do
echo "\nRunning $i\n"
go build -o binoutput github.com/saantiaguilera/go-pipeline/$(dirname $i)
./binoutput
if [ $? -ne 0 ]; then
rm binoutput
exit 1
fi
rm binoutput
done
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
Expand Down

0 comments on commit 78301b8

Please sign in to comment.