Skip to content

Commit 3a3da6e

Browse files
authored
Merge pull request #194 from berquist/ensure-sorted-regressionfiles-yaml
Ensure regressionfiles.yaml is sorted by filename
2 parents 460f948 + e84770b commit 3a3da6e

File tree

7 files changed

+1095
-965
lines changed

7 files changed

+1095
-965
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: ci
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
push:
7+
pull_request:
8+
9+
concurrency:
10+
group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
prechecks:
15+
uses: ./.github/workflows/pre-commit.yml
16+
all-prechecks:
17+
needs: [prechecks]
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Success
21+
run: "true"

.github/workflows/pre-commit.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: pre-commit
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
workflow_call:
7+
8+
concurrency:
9+
group: style-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
pre-commit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
18+
- name: install dependencies for sorting regressionfiles.yaml
19+
run: |
20+
python -m pip install 'ruamel.yaml'
21+
- uses: pre-commit/action@v3.0.1

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
*.pyc
22
.idea
33

4+
regressionfiles.diff
5+
regressionfiles.yaml.orig
6+
regressionfiles_nocomments.yaml
7+
regressionfiles_sorted.yaml
8+
49
# input files
510
*.in
611

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
---
22
fail_fast: false
3+
ci:
4+
skip:
5+
# The dependencies can't be installed on pre-commit.ci, but this runs in
6+
# the normal GitHub Actions workflow.
7+
- sort-regressionfiles-yaml
38
repos:
49
- repo: meta
510
hooks:
@@ -9,3 +14,14 @@ repos:
914
rev: "v5.0.0"
1015
hooks:
1116
- id: check-yaml
17+
- repo: local
18+
hooks:
19+
- id: sort-regressionfiles-yaml
20+
name: Sort regressionfiles.yaml
21+
entry: ./sort_regressionfiles_yaml.sh
22+
language: script
23+
files: ^regressionfiles\.yaml$
24+
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
25+
rev: "v1.7.3.17"
26+
hooks:
27+
- id: actionlint

0 commit comments

Comments
 (0)