forked from forbole/callisto
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
22 deletions.
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 |
---|---|---|
@@ -1,34 +1,24 @@ | ||
name: Tests | ||
# Tests / Code Coverage workflow runs unit tests and uploads a code coverage report. | ||
# This workflow is run on pushes to master & every Pull Requests where a .go, .mod, .sum have been changed. | ||
name: "Test" | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
workflow_call: | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
|
||
jobs: | ||
Cleanup-runs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rokroskar/workflow-run-cleanup-action@master | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" | ||
|
||
Unit-tests: | ||
unit-tests: | ||
name: "Unit Tests" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Test & Create coverage report | ||
run: make install test-unit stop-docker-test | ||
- name: Upload cove coverage | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
file: ./coverage.txt |