From 973094d030d4c9eab0792561279787332592ea0b Mon Sep 17 00:00:00 2001 From: JaclynCodes <218383634+JaclynCodes@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:28:20 -0500 Subject: [PATCH 1/3] Implement caching in Go CI workflow Added caching step to GitHub Actions workflow for Go. --- .github/workflows/go.yml | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 000000000..cc269cf25 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,49 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + - name: Cache + uses: actions/cache@v4.3.0 + with: + # A list of files, directories, and wildcard patterns to cache and restore + path: + # An explicit key for restoring and saving the cache + key: + # An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. + restore-keys: # optional + # The chunk size used to split up large files during upload, in bytes + upload-chunk-size: # optional + # An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms + enableCrossOsArchive: # optional, default is false + # Fail the workflow if cache entry is not found + fail-on-cache-miss: # optional, default is false + # Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache + lookup-only: # optional, default is false + # Run the post step to save the cache even if another step before fails + save-always: # optional, default is false + From 3ab84704bb8c22206c111441921a0b888ed69e06 Mon Sep 17 00:00:00 2001 From: Misfit <218383634+JaclynCodes@users.noreply.github.com> Date: Thu, 4 Dec 2025 08:11:45 -0500 Subject: [PATCH 2/3] Update .github/workflows/go.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/go.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cc269cf25..a1fccc3b1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -27,23 +27,23 @@ jobs: - name: Test run: go test -v ./... - - name: Cache - uses: actions/cache@v4.3.0 - with: - # A list of files, directories, and wildcard patterns to cache and restore - path: - # An explicit key for restoring and saving the cache - key: - # An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. - restore-keys: # optional - # The chunk size used to split up large files during upload, in bytes - upload-chunk-size: # optional - # An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms - enableCrossOsArchive: # optional, default is false - # Fail the workflow if cache entry is not found - fail-on-cache-miss: # optional, default is false - # Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache - lookup-only: # optional, default is false - # Run the post step to save the cache even if another step before fails - save-always: # optional, default is false + - name: Cache + uses: actions/cache@v4.3.0 + with: + # A list of files, directories, and wildcard patterns to cache and restore + path: + # An explicit key for restoring and saving the cache + key: + # An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. + restore-keys: # optional + # The chunk size used to split up large files during upload, in bytes + upload-chunk-size: # optional + # An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms + enableCrossOsArchive: # optional, default is false + # Fail the workflow if cache entry is not found + fail-on-cache-miss: # optional, default is false + # Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache + lookup-only: # optional, default is false + # Run the post step to save the cache even if another step before fails + save-always: # optional, default is false From e3687b0dda7d5d6858dad203cbe14fa4af33a3a0 Mon Sep 17 00:00:00 2001 From: Misfit <218383634+JaclynCodes@users.noreply.github.com> Date: Thu, 4 Dec 2025 08:12:10 -0500 Subject: [PATCH 3/3] Update .github/workflows/go.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/go.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index a1fccc3b1..fa9a20524 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -46,4 +46,3 @@ jobs: lookup-only: # optional, default is false # Run the post step to save the cache even if another step before fails save-always: # optional, default is false -