diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9814b46a..b5ad8746 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,12 +14,12 @@ jobs: goarch: [amd64] steps: - name: Checkout - uses: actions/checkout@v2 - - uses: wangyoucao577/go-release-action@v1.38 + uses: actions/checkout@v4 + - uses: wangyoucao577/go-release-action@v1.53 with: github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} - goversion: 1.20 + goversion: 1.23 pre_command: export CGO_ENABLED=0 project_path: "./sql-migrate" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cec4fceb..cc0a3295 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,9 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: setup-go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} cache: true @@ -28,17 +28,17 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: setup-go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "1.24" cache: true cache-dependency-path: go.sum - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: - version: v1.55.2 + version: v1.64 - name: go mod tidy run: go mod tidy - name: check for any changes @@ -85,9 +85,9 @@ jobs: PGPASSWORD: "password" steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: setup-go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} cache: true diff --git a/.golangci.yaml b/.golangci.yaml index f0a97075..85f20e1a 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -2,12 +2,15 @@ linters-settings: gocritic: disabled-checks: - ifElseChain + goimports: local-prefixes: github.com/rubenv/sql-migrate + govet: enable-all: true disable: - fieldalignment + depguard: rules: main: @@ -21,15 +24,19 @@ linters-settings: - github.com/mitchellh/cli - github.com/olekukonko/tablewriter - github.com/rubenv/sql-migrate + - gopkg.in/check.v1 + - gopkg.in/yaml.v2 + exhaustive: default-signifies-exhaustive: true + nolintlint: allow-unused: false - allow-leading-space: false allow-no-explanation: - depguard require-explanation: true require-specific: true + revive: enable-all-rules: false rules: @@ -50,7 +57,7 @@ linters-settings: - name: errorf - name: exported - name: identical-branches - - name: imports-blacklist + - name: imports-blocklist - name: increment-decrement - name: indent-error-flow - name: modifies-parameter @@ -74,9 +81,11 @@ linters-settings: - name: unused-receiver - name: unnecessary-stmt - name: unused-parameter + run: tests: true timeout: 1m + linters: disable-all: true enable: @@ -99,9 +108,10 @@ linters: - errorlint - gosimple - unparam + issues: exclude: - - 'declaration of "err" shadows declaration at' # Allow shadowing of `err` because it's so common + - 'declaration of "err" shadows declaration at' - 'error-strings: error strings should not be capitalized or end with punctuation or a newline' max-same-issues: 10000 max-issues-per-linter: 10000 diff --git a/go.mod b/go.mod index b62ad45f..7ddd7786 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/rubenv/sql-migrate -go 1.21 +go 1.23.0 require ( github.com/denisenkom/go-mssqldb v0.9.0 @@ -42,8 +42,8 @@ require ( github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/spf13/cast v1.5.0 // indirect - golang.org/x/crypto v0.31.0 // indirect + golang.org/x/crypto v0.37.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/sys v0.28.0 // indirect + golang.org/x/sys v0.32.0 // indirect google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/go.sum b/go.sum index 83a3f2e8..c096b360 100644 --- a/go.sum +++ b/go.sum @@ -125,8 +125,8 @@ golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -149,13 +149,13 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= diff --git a/test-integration/mysql-flag.sh b/test-integration/mysql-flag.sh index 3e0c940e..1366189f 100755 --- a/test-integration/mysql-flag.sh +++ b/test-integration/mysql-flag.sh @@ -7,4 +7,5 @@ OPTIONS="-config=test-integration/dbconfig.yml -env mysql_noflag" set -ex -sql-migrate status $OPTIONS | grep -q "Make sure that the parseTime option is supplied" +sql-migrate status $OPTIONS 2>&1 | grep -q "Make sure that the parseTime option is supplied" +