-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (48 loc) · 1.34 KB
/
pre-commit.yml
File metadata and controls
49 lines (48 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# SPDX-FileCopyrightText: Copyright © 2024 - 2025 Caleb Cushing
#
# SPDX-License-Identifier: CC0-1.0
name: precommit
on: [push, workflow_call]
jobs:
license:
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- &checkout-step
uses: actions/checkout@v6.0.2
with:
ref: ${{ github.event.workflow_run.head_branch }}
filter: "blob:none"
fetch-depth: 0
- uses: actions/setup-python@v6.2.0
with:
python-version: "3"
- run: pip install -r requirements.txt
- run: reuse lint
format:
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- *checkout-step
- uses: actions/setup-node@v6.3.0
with:
node-version: 24
package-manager-cache: false
- run: corepack enable
- uses: actions/setup-node@v6.3.0
with:
node-version: 24
cache: "yarn"
- run: yarn install --immutable --inline-builds --check-resolutions
- run: yarn exec prettier --ignore-unknown --check '**'
format-kotlin:
runs-on: ubuntu-24.04
steps:
- *checkout-step
- uses: actions/setup-java@v5.2.0
with:
distribution: temurin
java-version: 21
- uses: asdf-vm/actions/plugins-add@v4.0.1
- run: asdf install ktlint
- run: ktlint '*.gradle.kts' '**/*.gradle.kts'