From f9452a09fd3e9ddafd7c9f7e51f2f48b00664192 Mon Sep 17 00:00:00 2001 From: Yorick Smilda Date: Wed, 21 Aug 2024 12:16:48 +0200 Subject: [PATCH] Restructure actions --- .github/workflows/go-test.yml | 24 ++++++++++++++++++++++++ .github/workflows/go.yml | 22 ---------------------- .github/workflows/golangci-lint.yml | 22 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/go-test.yml delete mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/golangci-lint.yml diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..ce1b822 --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,24 @@ +name: go-test +on: + push: + branches: + - main + - master + pull_request: + +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read + +jobs: + go-test: + name: go-test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: stable + - name: test + run: go test ./... -cover diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 79c76ad..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Go - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.23' - - name: Test - run: go test ./... -cover - - name: Golangci-lint - uses: golangci/golangci-lint-action@v6.1.0 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..5affa4a --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,22 @@ +name: golangci-lint +on: + push: + branches: + - main + - master + 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: stable + - name: golangci-lint + uses: golangci/golangci-lint-action@v6