Skip to content

Commit

Permalink
Fix go caching (hyperledger-labs#761)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Brandenburger <[email protected]>
  • Loading branch information
mbrandenburger authored Sep 20, 2024
1 parent cea14de commit bd05a93
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
description: 'FSC dependency'

env:
FTS_PATH: "${{ github.workspace }}/fabric-token-sdk"
GOFLAGS: -mod=mod

jobs:
Expand All @@ -24,16 +23,14 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ${{ env.FTS_PATH }}

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "${{ env.FTS_PATH }}/go.mod"
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"

- name: Replace FSC dep
working-directory: ${{ env.FTS_PATH }}
run: |
if [ -n "${{ github.event.inputs.fsc-version }}" ]; then
echo "Replace FSC dependency"
Expand All @@ -44,11 +41,9 @@ jobs:
fi
- name: Set up tools
working-directory: ${{ env.FTS_PATH }}
run: make install-tools

- name: Run checks
working-directory: ${{ env.FTS_PATH }}
run: make checks

utest:
Expand All @@ -61,20 +56,17 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ${{ env.FTS_PATH }}

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "${{ env.FTS_PATH }}/go.mod"
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"

- name: Set up tools
working-directory: ${{ env.FTS_PATH }}
run: make install-tools

- name: Run ${{ matrix.tests }}
working-directory: ${{ env.FTS_PATH }}
run: make ${{ matrix.tests }}

itest:
Expand Down Expand Up @@ -129,26 +121,21 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ${{ env.FTS_PATH }}

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "${{ env.FTS_PATH }}/go.mod"
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"

- name: Set up tools
working-directory: ${{ env.FTS_PATH }}
run: make install-tools

- name: Download fabric binaries
working-directory: ${{ env.FTS_PATH }}
run: make download-fabric

- name: Docker
working-directory: ${{ env.FTS_PATH }}
run: make docker-images

- name: Run ${{ matrix.tests }}
working-directory: ${{ env.FTS_PATH }}
run: make integration-tests-${{ matrix.tests }}

0 comments on commit bd05a93

Please sign in to comment.