Skip to content

Commit 1c9024c

Browse files
authored
Merge pull request #1738 from jouvin/use_standard_ci_scripts
CI configuration: use same structure/scripts as in other repositories
2 parents ca08ffc + 6818e39 commit 1c9024c

File tree

4 files changed

+51
-24
lines changed

4 files changed

+51
-24
lines changed

.ci-scripts/indent

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -e # halt script on error
3+
4+
rm -f /tmp/indent.py
5+
wget -q https://raw.githubusercontent.com/stfc/Pan-Indenter/master/pan_indent_checker.py -O /tmp/indent.py
6+
chmod u+x /tmp/indent.py
7+
8+
git diff --name-only --diff-filter=d HEAD^ | grep '\.pan$' | xargs -rn1 /tmp/indent.py check || exit 1

.ci-scripts/panlint

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -e # halt script on error
3+
4+
rm -f /tmp/panlint.py
5+
wget -q https://raw.githubusercontent.com/quattor/pan/master/panc/src/main/scripts/panlint/panlint.py -O /tmp/panlint.py
6+
chmod u+x /tmp/panlint.py
7+
8+
git diff --name-only --diff-filter=d HEAD^ | grep '\.pan$' | xargs -r /tmp/panlint.py || exit 1

.github/workflows/continuous-integration.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,38 @@ jobs:
2929
runuser --shell /bin/bash --preserve-environment --command "source /usr/bin/mvn_test.sh && mvn_run \"dependency:resolve-plugins dependency:go-offline $MVN_ARGS\" && mvn_test" quattortest
3030
env:
3131
MVN_ARGS: -Dmaven.repo.local=/tmp/m2
32+
33+
panlint:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v4
38+
with:
39+
# we need the full repo or HEAD^ does not work
40+
fetch-depth: 0
41+
- name: Set up Python
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: 3
45+
- name: Install dependencies
46+
run: pip install colorama prettytable six
47+
- name: run panlint
48+
run: .ci-scripts/panlint
49+
50+
indentation:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout code
54+
uses: actions/checkout@v4
55+
with:
56+
# we need the full repo or HEAD^ does not work
57+
fetch-depth: 0
58+
- name: Set up Python
59+
uses: actions/setup-python@v5
60+
with:
61+
python-version: 3
62+
- name: Install dependencies
63+
run: pip install colorama
64+
- name: run indent checker
65+
run: .ci-scripts/indent
66+

.github/workflows/panlint.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)