Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/callable-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@ jobs:
)
echo "checksum=$checksum" >> "$GITHUB_OUTPUT"

# Use restore-keys to always use a cache that was created with the same
# prefix.
- name: Cache go modules and the buildcache
- name: Cache Go module cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
path: ~/go/pkg/mod
key: go-mod-${{ hashFiles('go.sum') }}

- name: Cache Go build cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/go-build
key: build-${{ matrix.go-version-alias }}-${{ steps.checksum.outputs.checksum }}
restore-keys: build-
restore-keys: |
build-${{ matrix.go-version-alias }}-

- name: Build sample mod
run: make examples/samplemod/build
17 changes: 10 additions & 7 deletions .github/workflows/callable-test-function.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@ jobs:
)
echo "checksum=$checksum" >> "$GITHUB_OUTPUT"

# Use restore-keys to always use a cache that was created with the same
# prefix.
- name: Cache go modules and the buildcache
- name: Cache Go module cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
path: ~/go/pkg/mod
key: go-mod-${{ hashFiles('go.sum') }}

- name: Cache Go build cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/go-build
key: function-test-${{ matrix.go-version-alias }}-${{ steps.checksum.outputs.checksum }}
restore-keys: function-test-
restore-keys: |
function-test-${{ matrix.go-version-alias }}-

- name: Run samplemod executable
run: make examples/samplemod/run
18 changes: 11 additions & 7 deletions .github/workflows/callable-test-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,24 @@ jobs:
)
echo "checksum=$checksum" >> "$GITHUB_OUTPUT"

# Use restore-keys to always use a cache that was created with the same
# prefix.
- name: Cache go modules and the buildcache
- name: Cache Go module cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
path: ~/go/pkg/mod
key: go-mod-${{ hashFiles('go.sum') }}

- name: Cache Go build cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/go-build
key: unit-test-${{ matrix.go-version-alias }}-${{ steps.checksum.outputs.checksum }}
restore-keys: unit-test-
restore-keys: |
unit-test-${{ matrix.go-version-alias }}-

- name: Run tests
run: make test/unit-json


- name: Publish test results
uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0
if: always()
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/code-scanning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,37 @@ jobs:
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: stable
cache-dependency-path: tools/go.sum
cache: false

- name: Checksum
id: checksum
run: |
checksum=$(
{
sha256sum tools/go.mod tools/go.sum
find . -type f -name "*.go" -print0 | sort -z | xargs -0 sha256sum
} | sha256sum | awk '{print $1}'
)
echo "checksum=$checksum" >> "$GITHUB_OUTPUT"

- name: Cache Go module cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/go/pkg/mod
key: govulncheck-go-mod-${{ hashFiles('tools/go.sum') }}

- name: Cache Go build cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/go-build
key: govulncheck-build-${{ steps.checksum.outputs.checksum }}
restore-keys: |
govulncheck-build-

- name: Run govulncheck
run: make static-analysis/vulncheck-sarif


- name: Upload SARIF report
if: always()
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.53.3
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,30 @@ jobs:
go-version-file: go.mod
cache: false

- name: Cache Go modules and build cache
- name: Checksum
id: checksum
run: |
checksum=$(
{
sha256sum go.mod go.sum tools/go.mod tools/go.sum
find . -type f -name "*.go" -print0 | sort -z | xargs -0 sha256sum
} | sha256sum | awk '{print $1}'
)
echo "checksum=$checksum" >> "$GITHUB_OUTPUT"

- name: Cache Go module cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/go/pkg/mod
key: copilot-go-mod-${{ hashFiles('go.sum', 'tools/go.sum') }}

- name: Cache Go build cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: copilot-go-${{ hashFiles('go.sum', 'tools/go.sum') }}
restore-keys: copilot-go-
path: ~/.cache/go-build
key: copilot-go-build-${{ steps.checksum.outputs.checksum }}
restore-keys: |
copilot-go-build-

- name: Download Go module dependencies
run: |
Expand Down