-
Notifications
You must be signed in to change notification settings - Fork 29
54 lines (50 loc) · 1.32 KB
/
format.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
45
46
47
48
49
50
51
52
53
54
name: format
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 16
- name: Collect changed files
uses: tj-actions/changed-files@v40
id: changed-files
with:
files: '**/*.md'
separator: ','
- name: MarkdownLint
if: steps.changed-files.outputs.any_changed == 'true'
uses: DavidAnson/markdownlint-cli2-action@v14
with:
globs: ${{ steps.changed-files.outputs.all_changed_files }}
separator: ','
clang-format:
needs: markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cpp-linter/cpp-linter-action@v2
id: cpp-lint
with:
style: file
tidy-checks: '-*' # disable clang tidy at this stage
version: 17
- name: Fail test
if: steps.cpp-lint.outputs.checks-failed > 0
run: echo "Some files failed the linting checks!" && exit 1
python-black:
needs: markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with: # see: https://black.readthedocs.io/en/stable/getting_started.html
src: "dipu"
version: "~= 24.3.0"