Skip to content

Commit 26db1d4

Browse files
committed
ENH: Add Continuous Integration infrastructure
1 parent d5ba20b commit 26db1d4

File tree

4 files changed

+101
-0
lines changed

4 files changed

+101
-0
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
groups:
9+
actions:
10+
patterns:
11+
- "*"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Commit Message Check"
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- edited
7+
- reopened
8+
- synchronize
9+
push:
10+
branches:
11+
- main
12+
13+
permissions:
14+
contents: read
15+
pull-requests: read
16+
17+
jobs:
18+
check-commit-message:
19+
runs-on: ubuntu-latest
20+
steps:
21+
# Check out the repository to ensure the step below has access to action source code.
22+
- uses: actions/checkout@v4
23+
24+
# Run the commit message validation action using the source code checked out in the previous step.
25+
- uses: ./
26+
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
pre-commit:
16+
name: Format
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.x"
26+
27+
- uses: pre-commit/action@v3.0.1
28+
29+
test-action:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- uses: ./
35+
with:
36+
token: ${{ secrets.GITHUB_TOKEN }}

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: "v4.5.0"
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: check-symlinks
9+
- id: check-yaml
10+
- id: debug-statements
11+
- id: end-of-file-fixer
12+
- id: mixed-line-ending
13+
- id: trailing-whitespace
14+
15+
- repo: https://github.com/pre-commit/mirrors-prettier
16+
rev: "v3.1.0"
17+
hooks:
18+
- id: prettier
19+
types_or: [yaml, markdown, html, css, scss, javascript, json]
20+
args: [--prose-wrap=always]
21+
22+
- repo: https://github.com/python-jsonschema/check-jsonschema
23+
rev: "0.28.0"
24+
hooks:
25+
- id: check-dependabot
26+
- id: check-github-actions
27+
- id: check-github-workflows

0 commit comments

Comments
 (0)