This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce unit tests execution workflow
- Loading branch information
1 parent
40f04dc
commit 4ff3f52
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Unit Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
workflow_call: | ||
outputs: | ||
workflow_output: | ||
description: "Unit tests output" | ||
value: ${{ jobs.go_test.outputs.test_output_failure }} | ||
|
||
jobs: | ||
go_test: | ||
name: Execution | ||
runs-on: ubuntu-latest | ||
outputs: | ||
test_output_failure: ${{ steps.run_tests_failure.outputs.test_output }} | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Run Go Test | ||
run: make unit-tests | ||
|
||
- name: Run Go Test Failed | ||
if: failure() | ||
id: run_tests_failure | ||
run: echo "test_output=false" >> $GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters