Skip to content

Commit

Permalink
Run pre-commit via GitHub Actions (#131)
Browse files Browse the repository at this point in the history
* Run pre-commit via GitHub Actions

* Remove the check-format Action because we already run clang-format via pre-commit

* Modify ubuntu_build Action yml file to let the Action run only once per pull request commit
  • Loading branch information
IshaanDesai authored Nov 7, 2024
1 parent 2a5a73a commit 8eb1d43
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 14 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/check-format.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/run-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run checks for pre-commit
on:
push:
branches:
- main
- develop
pull_request:
branches:
- "*"
jobs:
precommit:
name: pre-commit checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
check-latest: true
- name: Install pre-commit
run: pip install pre-commit
- name: Run checks
run: pre-commit run -a -v
- name: Git status
if: always()
run: git status
- name: Full diff
if: always()
run: git diff
9 changes: 8 additions & 1 deletion .github/workflows/ubuntu_build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Calculix 2.20 with preCICE adapter test build

on: [push, pull_request]
on:
push:
branches:
- main
- develop
pull_request:
branches:
- "*"

jobs:
build:
Expand Down

0 comments on commit 8eb1d43

Please sign in to comment.