Skip to content

Commit

Permalink
Revert ".github/workflows/appsec.yml: test with default GOMODCACHE"
Browse files Browse the repository at this point in the history
This reverts commit 9c12d7b.
  • Loading branch information
darccio committed Mar 19, 2024
1 parent 9c12d7b commit f284f36
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/appsec.yml
Expand Up @@ -67,7 +67,7 @@ jobs:
id: cfg
run: |
echo "key=go-pkg-mod-${{ hashFiles('**/go.sum') }}" >> $GITHUB_OUTPUT
echo "path=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
echo "path=go_pkg_mod_cache" >> $GITHUB_OUTPUT
- uses: actions/setup-go@v5
with:
Expand All @@ -84,6 +84,8 @@ jobs:

- name: Download Go modules
if: steps.cache.outputs.cache-hit != 'true'
env:
GOMODCACHE: ${{ github.workspace }}/${{ steps.cfg.outputs.path }}
run: go mod download -x

macos:
Expand Down Expand Up @@ -117,6 +119,8 @@ jobs:
# reruns under different settings.
- name: go test
shell: bash
env:
GOMODCACHE: ${{ github.workspace }}/${{ needs.go-mod-caching.outputs.path }}
run: |
set -euxo pipefail
cgocheck="GOEXPERIMENT=cgocheck2"
Expand Down Expand Up @@ -161,6 +165,11 @@ jobs:
go-version: stable
cache: false # we manage the caching ourselves

- run: go env -w GOMODCACHE=${{ github.workspace }}\${{ needs.go-mod-caching.outputs.path }}
if: runner.os == 'Windows'
- run: go env -w GOMODCACHE=${{ github.workspace }}/${{ needs.go-mod-caching.outputs.path }}
if: runner.os != 'Windows'

- name: go test
shell: bash
run: |
Expand Down Expand Up @@ -221,6 +230,8 @@ jobs:
sudo apt install -y docker-ce docker-ce-cli containerd.io
- name: Create container
env:
GOMODCACHE: ${{ github.workspace }}/${{ needs.go-mod-caching.outputs.path }}
run: |-
sudo docker run \
--rm \
Expand Down

0 comments on commit f284f36

Please sign in to comment.