From 99cd7887d56885e298903983c5f666fb76c69ae1 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 15 Mar 2024 14:11:34 +0000 Subject: [PATCH] Update CI (#45) Reviewed-on: https://gitea.com/xorm/reverse/pulls/45 --- .gitea/workflows/release-tag.yml | 4 ++-- .gitea/workflows/test.yml | 29 +++-------------------------- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/release-tag.yml b/.gitea/workflows/release-tag.yml index 293dc71..d812f17 100644 --- a/.gitea/workflows/release-tag.yml +++ b/.gitea/workflows/release-tag.yml @@ -9,11 +9,11 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: setup go - uses: https://github.com/actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: '>=1.20.1' - name: release-build diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 7ce8645..4860269 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -3,38 +3,15 @@ on: - push - pull_request -env: - GOPROXY: https://goproxy.io,direct - GOPATH: /go_path - GOCACHE: /go_cache - jobs: lint: name: check and test runs-on: ubuntu-latest steps: - - name: cache go path - id: cache-go-path - uses: https://github.com/actions/cache@v3 - with: - path: /go_path - key: go_path-${{ github.repository }}-${{ github.ref_name }} - restore-keys: | - go_path-${{ github.repository }}- - go_path- - - name: cache go cache - id: cache-go-cache - uses: https://github.com/actions/cache@v3 - with: - path: /go_cache - key: go_cache-${{ github.repository }}-${{ github.ref_name }} - restore-keys: | - go_cache-${{ github.repository }}- - go_cache- - - uses: actions/setup-go@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.20 - - uses: actions/checkout@v3 + go-version-file: "go.mod" - name: lint run: go install golang.org/x/lint/golint@latest && golint ./... - name: vet