From 6c9d4021c10636f096e912bef436add992496dc4 Mon Sep 17 00:00:00 2001 From: "Fatherhood.Foundation" <175760014+FreeMason9224@users.noreply.github.com> Date: Sat, 1 Feb 2025 21:42:28 -0600 Subject: [PATCH 1/2] Update go-tests.yml --- .github/workflows/go-tests.yml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index bf6cd209e15d..b16a80bc9a2f 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -26,13 +26,33 @@ permissions: jobs: test-linux: - if: github.repository_owner == 'github' - name: Test Linux (Ubuntu) - runs-on: ubuntu-latest-xl + if: github.repository_owner == 'FreeMason9224' + name: Test on Ubuntu + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [1.15, 1.16, 1.17] steps: + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go-version }} - name: Check out code uses: actions/checkout@v4 - - name: Run tests - uses: ./go/actions/test + - name: Cache Go modules + uses: actions/cache@v4 with: - run-code-checks: true + path: go/pkg/mod + key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-${{ matrix.go-version }}- + ${{ runner.os }}-go- + - name: Install dependencies + run: go mod download + - name: Run tests + run: go test ./... + - name: Run code checks + run: | + if [ "${{ matrix.go-version }}" == "1.17" ]; then + go vet ./... + fi From 84a902f582d62f271dcf47c04ff62d03b639b451 Mon Sep 17 00:00:00 2001 From: "Fatherhood.Foundation" <175760014+FreeMason9224@users.noreply.github.com> Date: Sat, 1 Feb 2025 21:49:00 -0600 Subject: [PATCH 2/2] Update go-tests.yml --- .github/workflows/go-tests.yml | 37 ++++++++++++++++------------------ 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index b16a80bc9a2f..c3a6eaed6318 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -26,33 +26,30 @@ permissions: jobs: test-linux: - if: github.repository_owner == 'FreeMason9224' - name: Test on Ubuntu - runs-on: ubuntu-latest - strategy: - matrix: - go-version: [1.15, 1.16, 1.17] + if: github.repository_owner == 'github' + name: Test Linux (Ubuntu) + runs-on: ubuntu-latest-xl steps: - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: ${{ matrix.go-version }} - name: Check out code uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.15 + - name: Cache Go modules - uses: actions/cache@v4 + uses: actions/cache@v3 with: - path: go/pkg/mod - key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | - ${{ runner.os }}-go-${{ matrix.go-version }}- ${{ runner.os }}-go- + - name: Install dependencies - run: go mod download + run: go mod tidy + - name: Run tests run: go test ./... - - name: Run code checks - run: | - if [ "${{ matrix.go-version }}" == "1.17" ]; then - go vet ./... - fi