Skip to content

Prevent False Positives in CI (#4642) #2322

Prevent False Positives in CI (#4642)

Prevent False Positives in CI (#4642) #2322

Workflow file for this run

name: Lints
on:
pull_request:
push:
branches: [main]
repository_dispatch:
types: [ok-to-test]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Go Version
shell: bash
run: |
set -euo pipefail
echo "GO_VER=$(cat .tool-versions | grep 'golang ' | cut -d' ' -f2)" >> $GITHUB_ENV
- name: Set Node Version
shell: bash
run: |
set -euo pipefail
echo "NODE_VER=$(cat .tool-versions | grep nodejs | cut -d' ' -f2)" >> $GITHUB_ENV
- name: Install asdf & tools
uses: asdf-vm/actions/install@v3
- name: Add asdf to PATH
shell: bash
run: |
set -euo pipefail
echo "~/.asdf/shims" >> $GITHUB_PATH
- name: Go Tidy
shell: bash
run: |
set -euo pipefail
go mod tidy
- name: Run pre-commit
shell: bash
run: |
set -euo pipefail
pre-commit run --show-diff-on-failure --color=always --all-files