diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index edeb1391..bc4ff63f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,14 +19,17 @@ env: jobs: lint: name: Lint + concurrency: + group: ${{ github.workflow }}-lint-${{ github.ref }} + cancel-in-progress: true runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Install Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v4 with: - go-version: 1.22.x + go-version: 1.23.x - name: Check Go module tidiness shell: bash run: | @@ -48,15 +51,15 @@ jobs: name: Test strategy: matrix: - go-version: [ 1.21.x, 1.22.x ] + go-version: [ 1.22.x, 1.23.x ] platform: [ ubuntu-latest, macos-latest, windows-latest ] runs-on: ${{ matrix.platform }} steps: + - name: Checkout code + uses: actions/checkout@v4 - name: Install Go uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v4 - name: Run tests with coverage run: go test -v -race -coverprofile=coverage -covermode=atomic ./... diff --git a/.github/workflows/lsif.yml b/.github/workflows/lsif.yml deleted file mode 100644 index 27180d73..00000000 --- a/.github/workflows/lsif.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: LSIF -on: - push: - paths: - - '**.go' - - 'go.mod' - - '.github/workflows/lsif.yml' -env: - GOPROXY: "https://proxy.golang.org" - -jobs: - lsif-go: - if: github.repository == 'gogs/git-module' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Generate LSIF data - uses: sourcegraph/lsif-go-action@master - - name: Upload LSIF data to sourcegraph.com - continue-on-error: true - uses: docker://sourcegraph/src-cli:latest - with: - args: lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} - - name: Upload LSIF data to cs.unknwon.dev - continue-on-error: true - uses: docker://sourcegraph/src-cli:latest - with: - args: -endpoint=https://cs.unknwon.dev lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} diff --git a/go.mod b/go.mod index bb3f3788..d56bcaa7 100644 --- a/go.mod +++ b/go.mod @@ -5,5 +5,5 @@ go 1.16 require ( github.com/mcuadros/go-version v0.0.0-20190308113854-92cdf37c5b75 github.com/stretchr/testify v1.9.0 - golang.org/x/sync v0.7.0 + golang.org/x/sync v0.8.0 ) diff --git a/go.sum b/go.sum index 94930dc0..b7248c76 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/repo_reference_test.go b/repo_reference_test.go index 4b7a9c36..d0e90e17 100644 --- a/repo_reference_test.go +++ b/repo_reference_test.go @@ -168,7 +168,7 @@ func TestRepository_SymbolicRef(t *testing.T) { // Set a symbolic reference _, err = r.SymbolicRef(SymbolicRefOptions{ - Name: "TEST-REF", + Name: "TEST_REF", Ref: RefsHeads + "develop", }) if err != nil { @@ -177,7 +177,7 @@ func TestRepository_SymbolicRef(t *testing.T) { // Get the symbolic reference we just set ref, err = r.SymbolicRef(SymbolicRefOptions{ - Name: "TEST-REF", + Name: "TEST_REF", }) if err != nil { t.Fatal(err)