forked from acoular/acoular
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (63 loc) · 2.07 KB
/
checks.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Linting and Formatting
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
branches: [ '*' ] # allow manual trigger for all branches
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v4
- name: Set up hatch
uses: ./.github/actions/setup-hatch
- name: Run ruff
run: hatch -v fmt --check
validate-cff:
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v4
- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/[email protected]
with:
args: --validate
link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: check links
id: lychee
uses: lycheeverse/lychee-action@v1
with:
# Check all markdown, html and reStructuredText files in repo (default)
args: --base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' --exclude file:///home/runner/work/acoular/acoular/docs/source/_themes/*
fail: true
alls-green:
name: Checks green?
if: always()
needs:
- linting
- validate-cff
- link-check
runs-on: ubuntu-latest
steps:
- id: workaround
uses: actions/github-script@v7
with:
# Workaround for https://github.com/re-actors/alls-green/issues/29
# we strip outputs from the needs object to avoid nested JSON
result-encoding: string
script: |
return JSON.stringify(Object.fromEntries(Object.entries(${{ toJSON(needs) }})
.map(([name, { result }]) => [name, { result, outputs: {} }])));
- name: All checks passed?
uses: re-actors/[email protected]
with:
jobs: ${{ steps.workaround.outputs.result }}