diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fed4b24..da8c28e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,32 +1,17 @@ name: Go on: - push: pull_request: + workflow_dispatch: jobs: build: - name: "Build" runs-on: ubuntu-latest - strategy: - matrix: - go: ["1.18"] steps: - - name: Updating ... - run: sudo apt-get -qq update - - uses: actions/checkout@v4 - - - name: Setup go - uses: actions/setup-go@v5 + - uses: actions/setup-go@v5 with: - go-version: ${{ matrix.go }} - - - name: Go build (source) - run: go build ./... - - - name: Go build (tests) - run: go test ./... - - - name: Go vet - run: go vet ./... + go-version-file: ./go.mod + - run: go build ./... + - run: go test ./... + - run: go vet ./... diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 87592e0..4d4289b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,14 +1,14 @@ name: Lint -on: pull_request +on: + pull_request: + workflow_dispatch: jobs: lint-commits: - name: Lint commits runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v4 + - uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} @@ -22,20 +22,14 @@ jobs: - name: Run commitsar uses: aevea/commitsar@v0.20.2 lint-code: - name: Lint code runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v4 - - name: Run golangci-lint - uses: golangci/golangci-lint-action@v6.1.1 + - uses: actions/checkout@v4 + - uses: golangci/golangci-lint-action@v6.1.1 lint-language: - name: Lint language runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v4 - - name: Run woke - uses: get-woke/woke-action@v0 + - uses: actions/checkout@v4 + - uses: get-woke/woke-action@v0 with: fail-on-error: true diff --git a/go.mod b/go.mod index ff2c48c..9c9af94 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/subpop/xrhidgen -go 1.18 +go 1.23 require ( github.com/google/go-cmp v0.6.0