Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 2 additions & 36 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,5 @@ on:
workflow_dispatch:

jobs:
analyze:
name: analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Install Go
uses: actions/setup-go@v2.2.0
with:
go-version: 1.17

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
codeql:
uses: go-faster/x/.github/workflows/codeql.yml@main
10 changes: 2 additions & 8 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,5 @@ on:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v2.4.0
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4.1.9
commit:
uses: go-faster/x/.github/workflows/commit.yml@main
85 changes: 2 additions & 83 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,86 +7,5 @@ on:
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0

- name: Install Go
uses: actions/setup-go@v2.2.0
with:
go-version: 1.17

- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 5m
skip-go-installation: true

# Check if there are any dirty changes after go mod tidy
mod:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0

- name: Install Go
uses: actions/setup-go@v2.2.0
with:
go-version: 1.17

- name: Get Go environment
id: go-env
run: |
echo "::set-output name=cache::$(go env GOCACHE)"
echo "::set-output name=modcache::$(go env GOMODCACHE)"
- name: Set up cache
uses: actions/cache@v2.1.7
with:
path: |
${{ steps.go-env.outputs.cache }}
${{ steps.go-env.outputs.modcache }}
key: check-mod-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
check-mod-${{ runner.os }}-go-

- name: Tidy
run: go mod tidy

- name: Check git diff
run: git diff --exit-code

# Check if there are any dirty changes after go generate
gen:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0

- name: Install Go
uses: actions/setup-go@v2.2.0
with:
go-version: 1.17

- name: Get Go environment
id: go-env
run: |
echo "::set-output name=cache::$(go env GOCACHE)"
echo "::set-output name=modcache::$(go env GOMODCACHE)"
- name: Set up cache
uses: actions/cache@v2.1.7
with:
path: |
${{ steps.go-env.outputs.cache }}
${{ steps.go-env.outputs.modcache }}
key: check-generate-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
check-generate-${{ runner.os }}-go-

- name: Generate
run: go generate ./...

- name: Check git diff
run: git diff --exit-code
lint:
uses: go-faster/x/.github/workflows/lint.yml@main
18 changes: 2 additions & 16 deletions .github/workflows/nancy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,5 @@ on:
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0

- name: Install Go
uses: actions/setup-go@v2.2.0
with:
go-version: 1.17

- name: List dependencies
run: go list -json -m all > go.list

- name: Run nancy
uses: sonatype-nexus-community/nancy-github-action@v1.0.2
nancy:
uses: go-faster/x/.github/workflows/nancy.yml@main
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
runner: ubuntu-latest
flags: "-race"
go: 1.17
- arch: arm64
runner: self-hosted
go: 1.17
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0
Expand Down