Skip to content

Commit 5e2b940

Browse files
committed
setup-go-test
1 parent 542aafe commit 5e2b940

23 files changed

+147
-335
lines changed

.DS_Store

6 KB
Binary file not shown.

.github/workflows/cache-dependency-path.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/cache-pip.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/cache-pipenv.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/cache-poetry.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/check-latest.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/go.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# name: Setup GO
2+
# on: push
3+
4+
# # jobs:
5+
# # build:
6+
# # runs-on: ubuntu-latest
7+
# # strategy:
8+
# # matrix:
9+
# # test: [ '1', '2' ]
10+
# # name: Test Job
11+
12+
# # steps:
13+
# # - name: Checkout code
14+
# # uses: actions/checkout@v5
15+
# # - name: Setup go
16+
# # uses: actions/setup-go@v6
17+
# # - run: echo "matrix run ${{ matrix.test }}"
18+
# jobs:
19+
# build:
20+
# runs-on: ubuntu-latest
21+
# steps:
22+
# - uses: actions/checkout@v5
23+
# - name: Setup Go
24+
# id: setup-go
25+
# uses: actions/setup-go@v6
26+
# with:
27+
# go-version: '1.24'
28+
# cache: false
29+
30+
# - name: Set Go cache environment variables
31+
# run: |
32+
# echo "GO_MOD_CACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
33+
# echo "GO_BUILD_CACHE=$(go env GOCACHE)" >> $GITHUB_ENV
34+
# - name: Set IMAGE_OS environment variable
35+
# run: |
36+
# if [ "$RUNNER_OS" = "Linux" ]; then
37+
# echo "IMAGE_OS=$ImageOS-" >> $GITHUB_ENV
38+
# else
39+
# echo "IMAGE_OS=" >> $GITHUB_ENV
40+
# fi
41+
# - name: Save lowercase arch
42+
# run: echo "ARCH=$(echo ${{ runner.arch }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
43+
44+
# - name: Restore Go cache
45+
# uses: actions/cache/restore@v4
46+
# id: go-cache
47+
# with:
48+
# path: |
49+
# ${{ env.GO_MOD_CACHE }}
50+
# ${{ env.GO_BUILD_CACHE }}
51+
# key: setup-go-${{ runner.os }}-${{ env.ARCH }}-${{ env.IMAGE_OS }}-go-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('**/go.sum') }}
52+
# restore-keys: |
53+
# setup-go-${{ runner.os }}-${{ env.ARCH }}-${{ env.IMAGE_OS }}-go-${{ steps.setup-go.outputs.go-version }}-
54+
# setup-go-
55+
# - name: Download modules
56+
# run: go mod download
57+
# - name: Build
58+
# run: go build ./...
59+
60+
61+
name: Setup GO
62+
on: push
63+
64+
jobs:
65+
build:
66+
runs-on: ${{ matrix.os }}
67+
strategy:
68+
matrix:
69+
os: [ubuntu-22.04, ubuntu-latest, macos-latest, windows-latest, self-hosted, ubuntu-24.04-arm, windows-11-arm, windows-2022]
70+
71+
steps:
72+
- uses: actions/checkout@v5
73+
74+
- name: Setup Go
75+
id: setup-go
76+
uses: actions/setup-go@v6
77+
with:
78+
go-version: '1.24'
79+
# cache: false
80+
81+
# - name: Set Go cache variables (Linux/macOS)
82+
# if: runner.os != 'Windows'
83+
# run: |
84+
# echo "GO_MOD_CACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
85+
# echo "GO_BUILD_CACHE=$(go env GOCACHE)" >> $GITHUB_ENV
86+
# - name: Set Go cache variables (Windows)
87+
# if: runner.os == 'Windows'
88+
# shell: pwsh
89+
# run: |
90+
# echo "GO_MOD_CACHE=$(go env GOMODCACHE)" | Out-File $env:GITHUB_ENV -Append
91+
# echo "GO_BUILD_CACHE=$(go env GOCACHE)" | Out-File $env:GITHUB_ENV -Append
92+
# - name: Save lowercase arch (POSIX)
93+
# if: runner.os != 'Windows'
94+
# run: echo "ARCH=$(echo '${{ runner.arch }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
95+
96+
# - name: Save lowercase arch (Windows)
97+
# if: runner.os == 'Windows'
98+
# shell: pwsh
99+
# run: |
100+
# $arch = "${{ runner.arch }}".ToLower()
101+
# echo "ARCH=$arch" | Out-File $env:GITHUB_ENV -Append
102+
# - name: Set cache OS suffix (Ubuntu only)
103+
# if: runner.os == 'Linux'
104+
# run: echo "CACHE_OS_SUFFIX=$ImageOS-" >> $GITHUB_ENV
105+
106+
107+
108+
# - name: Restore Go cache
109+
# id: go-cache
110+
# uses: actions/cache/restore@v4
111+
# with:
112+
# path: |
113+
# ${{ env.GO_MOD_CACHE }}
114+
# ${{ env.GO_BUILD_CACHE }}
115+
# key: setup-go-${{ runner.os }}-${{ env.ARCH }}-${{ env.CACHE_OS_SUFFIX }}go-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('**/go.sum') }}
116+
117+
- name: Download modules
118+
run: go mod download
119+
120+
- name: Build
121+
run: go build ./...

.github/workflows/testpr.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/testv5.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

Pipfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)