Skip to content

Commit

Permalink
Merge pull request #1738 from jouvin/use_standard_ci_scripts
Browse files Browse the repository at this point in the history
CI configuration: use same structure/scripts as in other repositories
  • Loading branch information
jrha authored Nov 19, 2024
2 parents ca08ffc + 6818e39 commit 1c9024c
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 24 deletions.
8 changes: 8 additions & 0 deletions .ci-scripts/indent
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e # halt script on error

rm -f /tmp/indent.py
wget -q https://raw.githubusercontent.com/stfc/Pan-Indenter/master/pan_indent_checker.py -O /tmp/indent.py
chmod u+x /tmp/indent.py

git diff --name-only --diff-filter=d HEAD^ | grep '\.pan$' | xargs -rn1 /tmp/indent.py check || exit 1
8 changes: 8 additions & 0 deletions .ci-scripts/panlint
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e # halt script on error

rm -f /tmp/panlint.py
wget -q https://raw.githubusercontent.com/quattor/pan/master/panc/src/main/scripts/panlint/panlint.py -O /tmp/panlint.py
chmod u+x /tmp/panlint.py

git diff --name-only --diff-filter=d HEAD^ | grep '\.pan$' | xargs -r /tmp/panlint.py || exit 1
35 changes: 35 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,38 @@ jobs:
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
env:
MVN_ARGS: -Dmaven.repo.local=/tmp/m2

panlint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# we need the full repo or HEAD^ does not work
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3
- name: Install dependencies
run: pip install colorama prettytable six
- name: run panlint
run: .ci-scripts/panlint

indentation:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# we need the full repo or HEAD^ does not work
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3
- name: Install dependencies
run: pip install colorama
- name: run indent checker
run: .ci-scripts/indent

24 changes: 0 additions & 24 deletions .github/workflows/panlint.yaml

This file was deleted.

0 comments on commit 1c9024c

Please sign in to comment.