15f156e8c7
The existing checks didn't read well in the `gh` cli: ❯ gh pr checks All checks were successful 0 failing, 7 successful, 0 skipped, and 0 pending checks ✓ DCO https://probot.github.io/apps/dco/ ✓ Docs 6m37s https://github.com/dagger/dagger/runs/5136044870?check_suite_focus=true ✓ Everything 1m43s https://github.com/dagger/dagger/runs/5136044863?check_suite_focus=true ✓ Integration 4m10s https://github.com/dagger/dagger/runs/5136044871?check_suite_focus=true ✓ Universe 11m6s https://github.com/dagger/dagger/runs/5136044860?check_suite_focus=true ✓ Universe - Europa 3m18s https://github.com/dagger/dagger/runs/5136044932?check_suite_focus=true ✓ netlify/devel-docs-dagge... https://app.netlify.com/sites/devel-docs-dagger-io/deploys/620499ee88ee240008b6cabf This change gives them more descriptive names: ❯ gh pr checks All checks were successful 0 failing, 8 successful, 0 skipped, and 0 pending checks ✓ DCO https://probot.github.io/apps/dco/ ✓ Integration Tests 4m22s https://github.com/dagger/dagger/runs/5139842686?check_suite_focus=true ✓ Lint 1m29s https://github.com/dagger/dagger/runs/5139842774?check_suite_focus=true ✓ Test Docs 7m44s https://github.com/dagger/dagger/runs/5139842682?check_suite_focus=true ✓ Unit Tests 2m11s https://github.com/dagger/dagger/runs/5139842684?check_suite_focus=true ✓ Universe Tests 13m14s https://github.com/dagger/dagger/runs/5139842932?check_suite_focus=true ✓ Universe Tests - Europa 2m36s https://github.com/dagger/dagger/runs/5139842678?check_suite_focus=true ✓ netlify/devel-docs-dagger-io/deploy... https://deploy-preview-1593--devel-docs-dagger-io.netlify.app Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
76 lines
1.7 KiB
YAML
76 lines
1.7 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- '**.go'
|
|
- '**.sh'
|
|
- '**.bash'
|
|
- '**.cue'
|
|
- 'docs/**'
|
|
- '.golangci.yml'
|
|
- 'Makefile'
|
|
- 'README.md'
|
|
- '.github/workflows/lint.yml'
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- '**.go'
|
|
- '**.sh'
|
|
- '**.bash'
|
|
- '**.cue'
|
|
- 'docs/**'
|
|
- '.golangci.yml'
|
|
- 'Makefile'
|
|
- 'README.md'
|
|
- '.github/workflows/lint.yml'
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Check out"
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: "Set up go"
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.16
|
|
|
|
- name: "Install deps"
|
|
run: |
|
|
# Cue
|
|
export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2 | head -1 | sed -E 's/\.[[:digit:]]\.[[:alnum:]]+-[[:alnum:]]+$//')"
|
|
export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz"
|
|
echo "Installing cue version $CUE_VERSION"
|
|
curl -L https://github.com/cue-lang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin
|
|
|
|
- name: "Lint go"
|
|
uses: golangci/golangci-lint-action@v2
|
|
with:
|
|
version: v1.39
|
|
skip-go-installation: true
|
|
args: --timeout=3m
|
|
|
|
- name: "Lint shell"
|
|
run: |
|
|
make shellcheck
|
|
|
|
- name: "Lint CUE"
|
|
run: |
|
|
make cuelint
|
|
|
|
- name: "Lint docs"
|
|
run: |
|
|
make docslint
|
|
|
|
- name: "Lint markdown"
|
|
uses: avto-dev/markdown-lint@v1
|
|
with:
|
|
config: ".markdownlint.yaml"
|
|
args: ./docs README.md
|