Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Schmidt committed Dec 2, 2023
1 parent 0b42ee4 commit 98cd5a9
Showing 1 changed file with 37 additions and 32 deletions.
69 changes: 37 additions & 32 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
name: Unit Test
on:
push:
branches-ignore:
- main
pull_request:
- main
workflow_call:
push:
branches-ignore:
- main
workflow_call:

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get go version from go.mod
run: |
echo "GO_VERSION=$(grep '^go ' go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Install dependencies
run: |
go install github.com/golang/mock/[email protected]
- name: Generate Mocks
run: |
make mocks
- name: Test with go
run: |
make coverage
# - name: Upload unit coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{secrets.CODECOV_TOKEN}}
# flags: unit
# files: coverage.cov
# verbose: false
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Print Docker debug info
run: |
docker inspect gha_aerospike
docker ps
docker ps -a
docker logs --tail all gha_aerospike
- name: Get go version from go.mod
run: |
echo "GO_VERSION=$(grep '^go ' go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Install dependencies
run: |
go install github.com/golang/mock/[email protected]
- name: Generate Mocks
run: |
make mocks
- name: Test with go
run: |
make coverage
# Uncomment the following lines when codecov secret is uploaded
# - name: Upload unit coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{secrets.CODECOV_TOKEN}}
# flags: unit
# files: coverage.cov
# verbose: false

0 comments on commit 98cd5a9

Please sign in to comment.