From 8e2334429cdc5d19fdac5951fa019ae3fdb6fd92 Mon Sep 17 00:00:00 2001 From: Andrew Kroh Date: Tue, 19 Mar 2024 17:17:18 -0400 Subject: [PATCH] use staticcheck GH action instead --- .ci/scripts/test.bat | 2 -- .ci/scripts/test.sh | 1 - .github/dependabot.yml | 9 +++++++++ .github/workflows/ci.yml | 11 +++++++++-- NOTICE.txt | 2 +- Vagrantfile | 30 ------------------------------ 6 files changed, 19 insertions(+), 36 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100644 Vagrantfile diff --git a/.ci/scripts/test.bat b/.ci/scripts/test.bat index 5e4498c..939103b 100755 --- a/.ci/scripts/test.bat +++ b/.ci/scripts/test.bat @@ -2,8 +2,6 @@ go mod verify || EXIT /B 1 go run github.com/elastic/go-licenser@latest -d || EXIT /B 1 -go run honnef.co/go/tools/cmd/staticcheck@2022.1 ./... || EXIT /B 1 - go run golang.org/x/tools/cmd/goimports@latest -l -local github.com/elastic/go-windows . || EXIT /B 1 SET OUTPUT_JSON_FILE=build\output-report.out diff --git a/.ci/scripts/test.sh b/.ci/scripts/test.sh index 04e23d4..cf1695d 100755 --- a/.ci/scripts/test.sh +++ b/.ci/scripts/test.sh @@ -4,7 +4,6 @@ set -e go mod verify go run github.com/elastic/go-licenser@latest -d -go run honnef.co/go/tools/cmd/staticcheck@2022.1 ./... out=$(go run golang.org/x/tools/cmd/goimports@latest -l -local github.com/elastic/go-windows .) if [ ! -z "$out" ]; then diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..88ddecf --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +--- +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" + open-pull-requests-limit: 2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 407b2d2..e267eb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,14 +26,21 @@ jobs: os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} cache: true cache-dependency-path: '**/go.sum' + - uses: dominikh/staticcheck-action@v1.3.0 + if: ${{ matrix.go-version == '1.22.x' }} + with: + version: "2023.1.7" + install-go: false + cache-key: ${{ matrix.go-version }} + - name: Test run: ${{ startsWith(matrix.os,'windows') && '.ci/scripts/test.bat' || '.ci/scripts/test.sh' }} env: diff --git a/NOTICE.txt b/NOTICE.txt index 807d3ab..86a6c31 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,5 +1,5 @@ Elastic go-windows -Copyright 2017-2019 Elasticsearch B.V. +Copyright 2017-2024 Elasticsearch B.V. This product includes software developed at Elasticsearch, B.V. (https://www.elastic.co/). diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 5f52954..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,30 +0,0 @@ -# NOTE: This is not a public image. It's only available within the Elastic -# organization and requires a 'vagrant login'. - -GO_VERSION = "1.12.4" - -# Provisioning for Windows PowerShell. -$winPsProvision = <