Skip to content

Commit

Permalink
Always run lint, regardless of branch (#1492)
Browse files Browse the repository at this point in the history
Someone working on a branch in their own fork won't see the lint running
on their github-actions CI until they open a pull request.

It'd be much easier to ensure changes being worked on are going to pass
the linter if the linter runs before the last step of opening the PR.
  • Loading branch information
jonesmz committed May 27, 2024
1 parent 4e8524d commit 525550a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Lint

on:
push:
branches: [ $default-branch ]
pull_request:
types: [ opened, reopened, synchronize ]

Expand All @@ -12,14 +11,20 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: install dependencies
with:
fetch-depth: 0

- name: Install Dependencies
uses: ./.github/workflows/actions/ubuntu-build-deps
with:
SUDO: true
- name: install clang-format-15

- name: Install clang-format-15
run: sudo apt install -y clang-format-15
- name: configure

- name: Configure
run: ./configure

- name: lint
run: |
if which clang-format-15 2>&1 >/dev/null
Expand Down

0 comments on commit 525550a

Please sign in to comment.