Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurdotb committed Jul 28, 2022
1 parent 3594c4f commit 6d4be9b
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/test.yml
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

0 comments on commit 6d4be9b

Please sign in to comment.