Merge pull request #689 from chrisallenlane/ci

chore(ci): YAML lints
This commit is contained in:
Chris Allen Lane 2022-08-05 07:53:53 -04:00 committed by GitHub
commit 9de866dfb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 64 deletions

View File

@ -1,57 +1,46 @@
---
name: Go name: Go
on: on:
push: push:
branches: [ master ] branches: [master]
pull_request: pull_request:
branches: [ master ] branches: [master]
jobs: jobs:
# TODO: is it possible to DRY out these jobs? Aside from `runs-on`, they are # TODO: is it possible to DRY out these jobs? Aside from `runs-on`, they are
# identical. # identical.
# See: https://github.com/actions/runner/issues/1182
build-linux: build-linux:
runs-on: [ ubuntu-latest ] runs-on: [ubuntu-latest]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Go
- name: Set up Go uses: actions/setup-go@v2
uses: actions/setup-go@v2 with:
with: go-version: 1.19
go-version: 1.18 - name: Set up Revive (linter)
run: go get -u github.com/boyter/scc github.com/mgechev/revive
- name: Set up Revive (linter) env:
run: go get -u github.com/boyter/scc github.com/mgechev/revive GO111MODULE: "off"
env: - name: Build
GO111MODULE: off run: make build
- name: Test
run: make test
- name: Build
run: make build
- name: Test
run: make test
build-osx: build-osx:
runs-on: [ macos-latest ] runs-on: [macos-latest]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Go
- name: Set up Go uses: actions/setup-go@v2
uses: actions/setup-go@v2 with:
with: go-version: 1.19
go-version: 1.18 - name: Set up Revive (linter)
run: go get -u github.com/boyter/scc github.com/mgechev/revive
- name: Set up Revive (linter) env:
run: go get -u github.com/boyter/scc github.com/mgechev/revive GO111MODULE: "off"
env: - name: Build
GO111MODULE: off run: make build
- name: Test
- name: Build run: make test
run: make build
- name: Test
run: make test
# TODO: windows

View File

@ -1,12 +1,11 @@
---
name: CodeQL name: CodeQL
on: on:
push: push:
branches: [ master ] branches: [master]
pull_request: pull_request:
branches: [ master ] branches: [master]
schedule: schedule:
- cron: '45 23 * * 0' - cron: '45 23 * * 0'
@ -14,23 +13,18 @@ jobs:
analyze: analyze:
name: Analyze name: Analyze
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: [ 'go' ] language: [go]
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Initialize CodeQL
- name: Initialize CodeQL uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v1 with:
with: languages: ${{ matrix.language }}
languages: ${{ matrix.language }} - name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Autobuild - name: Perform CodeQL Analysis
uses: github/codeql-action/autobuild@v1 uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@ -1,3 +1,4 @@
---
name: homebrew name: homebrew
on: on:
@ -11,7 +12,8 @@ jobs:
steps: steps:
- uses: mislav/bump-homebrew-formula-action@v1 - uses: mislav/bump-homebrew-formula-action@v1
with: 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 formula-name: cheat
env: env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }} COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}