-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.08 KB
/
lint.yml
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
# Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: CC0-1.0
name: lint
on:
push:
branches: ['**']
tags: ['v*.*.*']
pull_request:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
package_json_file: 'frontend/package.json'
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: ./pyproject.toml
python-version: '3.12'
- name: Install pre-commit
run: |-
python -m pip install pre-commit
- name: Install dependencies
run: |-
python -m pip install '.[dev]'
- name: Install dependencies (frontend)
working-directory: frontend/
run: |-
pnpm install
- name: Run pre-commit
run: |-
pre-commit run --all-files
- name: Print changed files
if: failure()
run: |-
git add . && git status -vv