1
0
mirror of https://github.com/arduino/library-registry.git synced 2025-07-28 02:41:51 +03:00

Merge pull request #358 from per1234/extendable-check-go

Make "Check Go" workflow module path support extendable
This commit is contained in:
per1234
2021-08-13 01:26:46 -07:00
committed by GitHub
2 changed files with 61 additions and 11 deletions

View File

@ -26,8 +26,16 @@ on:
jobs:
check-errors:
name: check-errors (${{ matrix.module.path }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module:
- path: .github/workflows/assets/validate-registry/
steps:
- name: Checkout repository
uses: actions/checkout@v2
@ -44,11 +52,21 @@ jobs:
version: 3.x
- name: Check for errors
env:
GO_MODULE_PATH: ${{ matrix.module.path }}
run: task go:vet
check-outdated:
name: check-outdated (${{ matrix.module.path }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module:
- path: .github/workflows/assets/validate-registry/
steps:
- name: Checkout repository
uses: actions/checkout@v2
@ -65,14 +83,24 @@ jobs:
version: 3.x
- name: Modernize usages of outdated APIs
env:
GO_MODULE_PATH: ${{ matrix.module.path }}
run: task go:fix
- name: Check if any fixes were needed
run: git diff --color --exit-code
check-style:
name: check-style (${{ matrix.module.path }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module:
- path: .github/workflows/assets/validate-registry/
steps:
- name: Checkout repository
uses: actions/checkout@v2
@ -92,11 +120,21 @@ jobs:
run: go install golang.org/x/lint/golint@latest
- name: Check style
env:
GO_MODULE_PATH: ${{ matrix.module.path }}
run: task --silent go:lint
check-formatting:
name: check-formatting (${{ matrix.module.path }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module:
- path: .github/workflows/assets/validate-registry/
steps:
- name: Checkout repository
uses: actions/checkout@v2
@ -113,14 +151,24 @@ jobs:
version: 3.x
- name: Format code
env:
GO_MODULE_PATH: ${{ matrix.module.path }}
run: task go:format
- name: Check formatting
run: git diff --color --exit-code
check-config:
name: check-config (${{ matrix.module.path }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module:
- path: .github/workflows/assets/validate-registry/
steps:
- name: Checkout repository
uses: actions/checkout@v2
@ -137,6 +185,8 @@ jobs:
version: 3.x
- name: Run go mod tidy
env:
GO_MODULE_PATH: ${{ matrix.module.path }}
run: task go:tidy
- name: Check whether any tidying was needed