Skip to content

Commit cd2cd7a

Browse files
committed
feat: github action and commit rules
1 parent 987dade commit cd2cd7a

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

.conform.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
policies:
2+
- type: commit
3+
spec:
4+
header:
5+
length: 89
6+
imperative: true
7+
case: lower
8+
invalidLastCharacters: .
9+
body:
10+
required: true
11+
dco: false
12+
gpg:
13+
required: true
14+
spellcheck:
15+
locale: US
16+
maximumOfOneCommit: false
17+
conventional:
18+
scopes:
19+
- master
20+
- deps
21+
types:
22+
- feat
23+
- fix
24+
- chore
25+
- deps
26+
- docs
27+
- ci

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Test"
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
tests:
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macos-latest]
12+
runs-on: ${{ matrix.os }}
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: cachix/install-nix-action@v26
17+
- uses: cachix/cachix-action@v14
18+
with:
19+
name: devenv
20+
- name: Install devenv.sh
21+
run: nix profile install nixpkgs#devenv
22+
23+
- name: Build the devenv shell and run any pre-commit hooks
24+
run: devenv test
25+
26+
- name: OpenRailRouting tests
27+
run: devenv shell mvn test

devenv.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@
1010
packages = with pkgs; [
1111
osmctools
1212
];
13+
14+
pre-commit.hooks = {
15+
conform.enable = true;
16+
};
1317
}

0 commit comments

Comments
 (0)