Skip to content

Commit

Permalink
build(ci): updated test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RiccardoM authored and MonikaCat committed Jan 19, 2024
1 parent b1cb8fd commit 2823c29
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,39 @@ jobs:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/cosmos')"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

Unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Setup Go

- name: Setup Go 🧰
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Test & Create coverage report
run: make install test-unit
- name: Upload cove coverage
uses: codecov/codecov-action@v1.0.14

- name: Compute diff 📜
uses: technote-space/get-diff-action@v6.1.0
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Build 🔨
if: "env.GIT_DIFF != ''"
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build

- name: Test & Coverage report creation 🧪
run: |
make install test-unit stop-docker-test
- name: Upload coverage 📤
if: "env.GIT_DIFF != ''"
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt

0 comments on commit 2823c29

Please sign in to comment.