diff --git a/.github/workflows/cleanup-test.yaml b/.github/workflows/cleanup-test.yaml index 7961d49..13fddc3 100644 --- a/.github/workflows/cleanup-test.yaml +++ b/.github/workflows/cleanup-test.yaml @@ -8,6 +8,12 @@ jobs: steps: - name: Check out Code uses: actions/checkout@v3 + - name: test + id: tester + run: | + echo "path=./LICENSE" >> $GITHUB_ENV + - run: | + echo "This is a test ${{ hashFiles('${{steps.tester.ouputs.path}}') }}" - name: cleanup with cancel if: always() id: did_skip diff --git a/chainlink-testing-framework/setup-go/action.yml b/chainlink-testing-framework/setup-go/action.yml index 473ee6b..c6abafe 100644 --- a/chainlink-testing-framework/setup-go/action.yml +++ b/chainlink-testing-framework/setup-go/action.yml @@ -30,6 +30,19 @@ runs: go-version-file: ${{ inputs.go_mod_path }} check-latest: true + - name: Get sum path from mod + id: sum-path + shell: bash + run: | + # get the base path for the go test project + TEST_LIB_PATH="${{ inputs.go_mod_path }}" + if [ "${#TEST_LIB_PATH}" -gt "6" ]; then + TEST_LIB_PATH=${TEST_LIB_PATH%go.mod} + echo "path=${TEST_LIB_PATH}" >> $GITHUB_ENV + else + echo "path=./" >> $GITHUB_ENV + fi + - name: Cache Vendor Packages if: inputs.cache_restore_only == 'false' uses: actions/cache@v3 @@ -39,7 +52,7 @@ runs: ~/.cache/go-build ~/go/pkg/mod ~/go/bin - key: ${{ runner.os }}-${{ inputs.cache_key_id }}-${{ hashFiles('**/go.sum') }} + key: ${{ runner.os }}-${{ inputs.cache_key_id }}-${{ hashFiles('${{ steps.sum-path.outputs.path}}/go.sum') }} restore-keys: | ${{ runner.os }}-${{ inputs.cache_key_id }}-