Skip to content

Commit

Permalink
Removed duplicate runs from CI workflows. (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvind5 authored Dec 3, 2024
1 parent b022f15 commit a235f93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/onmergerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,15 @@ jobs:
with:
go-version: '1.22'


- name: Style Checker
run: |
make go-fmt
if [ "$(make go-fmt | tail -n 1 | grep gofmt | wc -l)" -eq 0 ]; then
echo "Code is not formatted properly"
exit 1
fi
- name: Unit Test
run: |
make test
if [ $? -ne 0 ]; then
exit 1
fi
- name: Unit Test Coverage
run: |
make test-coverage
COVERAGE=$(make test-coverage | grep 'total' | awk '{print $3}' | awk -F. '{print $1}')
echo "Unit test coverage is - $COVERAGE%"
if [[ $COVERAGE -lt 80 ]]; then
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/onpullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
permissions: read-all

jobs:

security-file-check:
runs-on: [ ubuntu-20.04 ]
steps:
Expand All @@ -23,35 +22,29 @@ jobs:
build-test-scan:
runs-on: [ ubuntu-20.04 ]
needs: [ "security-file-check" ]
env:
http_proxy: ${{ secrets.HTTP_PROXY }}
https_proxy: ${{ secrets.HTTPS_PROXY }}
no_proxy: ${{ secrets.NO_PROXY }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.22'


- name: Style Checker
run: |
make go-fmt
if [ "$(make go-fmt | tail -n 1 | grep gofmt | wc -l)" -eq 0 ]; then
echo "Code is not formatted properly"
exit 1
fi
- name: Unit Test
run: |
make test
if [ $? -ne 0 ]; then
exit 1
fi
- name: Unit Test Coverage
run: |
make test-coverage
COVERAGE=$(make test-coverage | grep 'total' | awk '{print $3}' | awk -F. '{print $1}')
echo "Unit test coverage is - $COVERAGE%"
if [[ $COVERAGE -lt 80 ]]; then
Expand Down

0 comments on commit a235f93

Please sign in to comment.