mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-17 22:32:26 +08:00
feat(CI): add a GitHub Action to lint the YAML files
Add a `.yamllint` config file Lint YAML. https://yamllint.readthedocs.io/en/stable/
This commit is contained in:
parent
1bdf86b722
commit
4bd0b4dc96
22
.github/workflows/lint.yml
vendored
Normal file
22
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Lint
|
||||||
|
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
yamllint:
|
||||||
|
name: YAML
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
||||||
|
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install yamllint
|
||||||
|
- name: YAML Lint
|
||||||
|
run: |
|
||||||
|
# return non-zero exit code on warnings
|
||||||
|
yamllint --strict .
|
30
.travis.yml
30
.travis.yml
@ -3,21 +3,21 @@ language: go
|
|||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- go: 1.12.x
|
- go: 1.12.x
|
||||||
env: GO111MODULE=on
|
env: GO111MODULE=on
|
||||||
- go: 1.13.x
|
- go: 1.13.x
|
||||||
- go: 1.13.x
|
- go: 1.13.x
|
||||||
env:
|
env:
|
||||||
- TESTTAGS=nomsgpack
|
- TESTTAGS=nomsgpack
|
||||||
- go: 1.14.x
|
- go: 1.14.x
|
||||||
- go: 1.14.x
|
- go: 1.14.x
|
||||||
env:
|
env:
|
||||||
- TESTTAGS=nomsgpack
|
- TESTTAGS=nomsgpack
|
||||||
- go: 1.15.x
|
- go: 1.15.x
|
||||||
- go: 1.15.x
|
- go: 1.15.x
|
||||||
env:
|
env:
|
||||||
- TESTTAGS=nomsgpack
|
- TESTTAGS=nomsgpack
|
||||||
- go: master
|
- go: master
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: 10
|
depth: 10
|
||||||
|
Loading…
x
Reference in New Issue
Block a user