From eb99a070ce13f7e72304672e60bc89f809152faa Mon Sep 17 00:00:00 2001 From: Christopher Allen Lane Date: Fri, 5 Aug 2022 07:21:27 -0400 Subject: [PATCH] chore: CI template nits - Fix YAML nits per `yamllint` - Upgrade Go version to `1.19` --- .github/workflows/build.yml | 75 ++++++++++++--------------- .github/workflows/codeql-analysis.yml | 34 +++++------- .github/workflows/homebrew.yml | 4 +- 3 files changed, 49 insertions(+), 64 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 431696c..228f817 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,57 +1,46 @@ +--- name: Go on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: # TODO: is it possible to DRY out these jobs? Aside from `runs-on`, they are # identical. + # See: https://github.com/actions/runner/issues/1182 build-linux: - runs-on: [ ubuntu-latest ] - + runs-on: [ubuntu-latest] steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.18 - - - name: Set up Revive (linter) - run: go get -u github.com/boyter/scc github.com/mgechev/revive - env: - GO111MODULE: off - - - - name: Build - run: make build - - - name: Test - run: make test + - uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.19 + - name: Set up Revive (linter) + run: go get -u github.com/boyter/scc github.com/mgechev/revive + env: + GO111MODULE: "off" + - name: Build + run: make build + - name: Test + run: make test build-osx: - runs-on: [ macos-latest ] - + runs-on: [macos-latest] steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.18 - - - name: Set up Revive (linter) - run: go get -u github.com/boyter/scc github.com/mgechev/revive - env: - GO111MODULE: off - - - name: Build - run: make build - - - name: Test - run: make test - - # TODO: windows + - uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.19 + - name: Set up Revive (linter) + run: go get -u github.com/boyter/scc github.com/mgechev/revive + env: + GO111MODULE: "off" + - name: Build + run: make build + - name: Test + run: make test diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 941e993..1bf49a3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,12 +1,11 @@ +--- name: CodeQL on: push: - branches: [ master ] - + branches: [master] pull_request: - branches: [ master ] - + branches: [master] schedule: - cron: '45 23 * * 0' @@ -14,23 +13,18 @@ jobs: analyze: name: Analyze runs-on: ubuntu-latest - strategy: fail-fast: false matrix: - language: [ 'go' ] - + language: [go] steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Checkout repository + uses: actions/checkout@v2 + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml index 23f26ca..2014431 100644 --- a/.github/workflows/homebrew.yml +++ b/.github/workflows/homebrew.yml @@ -1,3 +1,4 @@ +--- name: homebrew on: @@ -11,7 +12,8 @@ jobs: steps: - uses: mislav/bump-homebrew-formula-action@v1 with: - # A PR will be sent to github.com/Homebrew/homebrew-core to update this formula: + # A PR will be sent to github.com/Homebrew/homebrew-core to update + # this formula: formula-name: cheat env: COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}