Skip to content

Commit

Permalink
Merge Pull Request #2334 from berquist/sst-elements/gha-pre-commit
Browse files Browse the repository at this point in the history
Automatically Merged using SST Pull Request AutoTester
PR Title: b'GitHub Actions infrastructure for pre-commit checks'
PR Author: berquist
  • Loading branch information
sst-autotester authored Mar 14, 2024
2 parents 26b18b7 + 2c2bc55 commit 3b7b862
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: ci

# yamllint disable-line rule:truthy
on:
push:
pull_request:

concurrency:
group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
cancel-in-progress: true

jobs:
prechecks:
uses: ./.github/workflows/pre-commit.yml
all-prechecks:
needs: [prechecks]
runs-on: ubuntu-latest
steps:
- name: Success
run: "true"
18 changes: 18 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: pre-commit

# yamllint disable-line rule:truthy
on:
workflow_call:

concurrency:
group: style-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
cancel-in-progress: true

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
fail_fast: false
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: "v1.6.26.11"
hooks:
- id: actionlint

0 comments on commit 3b7b862

Please sign in to comment.