ci: fix golang runner - use go 1.26, remove -mod=readonly, add go mod tidy
This commit is contained in:
@@ -9,10 +9,9 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: golang
|
runs-on: golang
|
||||||
container:
|
container:
|
||||||
image: golang:1.25
|
image: golang:1.26
|
||||||
env:
|
env:
|
||||||
GOPRIVATE: forgejo.riotpiao.com
|
GOPRIVATE: forgejo.riotpiao.com
|
||||||
GOFLAGS: -mod=readonly
|
|
||||||
GITHUB_TOKEN: ${{ secrets.REGISTRY_PAT }}
|
GITHUB_TOKEN: ${{ secrets.REGISTRY_PAT }}
|
||||||
steps:
|
steps:
|
||||||
- name: Configure git authentication
|
- name: Configure git authentication
|
||||||
@@ -20,22 +19,25 @@ jobs:
|
|||||||
git config --global url."https://oauth2:${{ secrets.REGISTRY_PAT }}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com"
|
git config --global url."https://oauth2:${{ secrets.REGISTRY_PAT }}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com"
|
||||||
git config --global credential.helper store
|
git config --global credential.helper store
|
||||||
echo "https://oauth2:${{ secrets.REGISTRY_PAT }}@forgejo.riotpiao.com" >> ~/.git-credentials
|
echo "https://oauth2:${{ secrets.REGISTRY_PAT }}@forgejo.riotpiao.com" >> ~/.git-credentials
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git init
|
git init
|
||||||
git remote add origin https://forgejo.riotpiao.com/rock/poimen-workflows.git
|
git remote add origin https://forgejo.riotpiao.com/rock/poimen-workflows.git
|
||||||
git fetch origin ${{ github.ref_name }} --depth=1
|
git fetch origin ${{ github.ref_name }} --depth=1
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: go mod download
|
run: go mod download
|
||||||
|
|
||||||
|
- name: Tidy modules
|
||||||
|
run: go mod tidy
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test -v ./...
|
run: go test -v ./...
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -o /tmp/poimen-bin/ ./cmd/...
|
run: go build -o /tmp/poimen-bin/ ./cmd/...
|
||||||
|
|
||||||
- name: Vet
|
- name: Vet
|
||||||
run: go vet ./...
|
run: go vet ./...
|
||||||
|
|||||||
Reference in New Issue
Block a user