-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from jrha/ci-tests
workflows: Update and make consistent with template-library-core
- Loading branch information
Showing
2 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 HEAD^ | grep '\.pan$' | xargs -r /tmp/indent.py check || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,38 +3,50 @@ name: Run Tests | |
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
test-library: | ||
runs-on: ubuntu-latest | ||
container: centos:7 | ||
container: ghcr.io/quattor/quattor-test-container:latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: yum -y install wget subversion git | ||
- name: Setup Java JDK | ||
uses: actions/[email protected] | ||
with: | ||
java-version: 11 | ||
distribution: adopt | ||
run: dnf -y install subversion | ||
- name: run tests | ||
run: .ci-scripts/test-library | ||
env: | ||
TRAVIS_BUILD_DIR: "$GITHUB_WORKSPACE" | ||
TRAVIS_REPO_SLUG: "$GITHUB_REPOSITORY" | ||
TRAVIS_BRANCH: "${GITHUB_HEAD_REF:-master}" | ||
|
||
panlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
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@v4 | ||
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: run indent checker | ||
run: .ci-scripts/indent |