diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml deleted file mode 100644 index 26be6d8..0000000 --- a/.github/workflows/golangci-lint.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: golangci-lint -on: [push, pull_request] - -permissions: - contents: read - -jobs: - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: "1.21" - cache: false - - name: golangci-lint - uses: golangci/golangci-lint-action@v4 - with: - version: v1.54 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0b70426..2c22b9a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,18 +1,44 @@ on: [push, pull_request] -name: Test +name: skipper-test + +env: + GO_VERSION: "1.21.0" + GO_VERSION_SHORT: "1.21" + GOLANGCI_VERSION: "v1.54.0" + +permissions: + contents: read + jobs: + vet: + name: "go vet" + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + - uses: actions/checkout@v4 + - run: go vet $(go list ./... | grep -v /vendor/) + + golangci-lint: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + - name: golangci-lint + uses: golangci/golangci-lint-action@v4 + with: + version: v1.54 + test: - strategy: - matrix: - go-version: [1.20.x, 1.21.x] - os: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} + name: "test" + runs-on: ubuntu-latest steps: - - name: Setup Go - uses: actions/setup-go@v4.1.0 + - uses: actions/setup-go@v5 with: - go-version: ${{ matrix.go-version }} - - name: Checkout - uses: actions/checkout@v4 - - name: Run tests - uses: robherley/go-test-action@v0.1.0 + go-version: ${{ env.GO_VERSION }} + - uses: actions/checkout@v4 + - run: go test $(go list ./... | grep -v /vendor/)