Skip to content

Commit

Permalink
Merge pull request #194 from berquist/ensure-sorted-regressionfiles-yaml
Browse files Browse the repository at this point in the history
Ensure regressionfiles.yaml is sorted by filename
  • Loading branch information
shivupa authored Nov 27, 2024
2 parents 460f948 + e84770b commit 3a3da6e
Show file tree
Hide file tree
Showing 7 changed files with 1,095 additions and 965 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"
21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
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
- name: install dependencies for sorting regressionfiles.yaml
run: |
python -m pip install 'ruamel.yaml'
- uses: pre-commit/[email protected]
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
*.pyc
.idea

regressionfiles.diff
regressionfiles.yaml.orig
regressionfiles_nocomments.yaml
regressionfiles_sorted.yaml

# input files
*.in

Expand Down
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
fail_fast: false
ci:
skip:
# The dependencies can't be installed on pre-commit.ci, but this runs in
# the normal GitHub Actions workflow.
- sort-regressionfiles-yaml
repos:
- repo: meta
hooks:
Expand All @@ -9,3 +14,14 @@ repos:
rev: "v5.0.0"
hooks:
- id: check-yaml
- repo: local
hooks:
- id: sort-regressionfiles-yaml
name: Sort regressionfiles.yaml
entry: ./sort_regressionfiles_yaml.sh
language: script
files: ^regressionfiles\.yaml$
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: "v1.7.3.17"
hooks:
- id: actionlint
Loading

0 comments on commit 3a3da6e

Please sign in to comment.