From 6d4be9bc50038c422b0506239d08917ee5661094 Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Thu, 28 Jul 2022 15:24:29 +0100 Subject: [PATCH] Update test.yml --- .github/workflows/test.yml | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e25e23143..6456cf3bf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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