Skip to content

Commit

Permalink
Merge pull request #242 from jouvin/github-actions
Browse files Browse the repository at this point in the history
CI: replace Travis by GitHub actions
  • Loading branch information
jouvin authored Oct 27, 2021
2 parents cbdb9bb + f843ee8 commit b05c2fa
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis-scripts/panlint → .ci-scripts/panlint
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ 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 HEAD^ | grep '\.pan$' | xargs -r /tmp/panlint.py --always_exit_success || exit 1
git diff --name-only HEAD^ | grep '\.pan$' | xargs -r /tmp/panlint.py || exit 1
2 changes: 1 addition & 1 deletion .travis-scripts/test-library → .ci-scripts/test-library
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ rm -f /tmp/create-vanilla-SCDB.sh
wget -q https://raw.githubusercontent.com/quattor/scdb/master/utils/scdb/create-vanilla-SCDB.sh -O /tmp/create-vanilla-SCDB.sh
chmod u+x /tmp/create-vanilla-SCDB.sh

/tmp/create-vanilla-SCDB.sh -F --continuous-integration HEAD
/tmp/create-vanilla-SCDB.sh -F --debug --continuous-integration HEAD
40 changes: 40 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run Tests

on: [push, pull_request]

jobs:
test-library:
runs-on: ubuntu-latest
container: centos:7
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: yum -y install wget subversion git
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 11
distribution: adopt
- 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@v2
with:
# we need the full repo or HEAD^ does not work
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install dependencies
run: pip install colorama prettytable six
- name: run panlint
run: .ci-scripts/panlint
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

0 comments on commit b05c2fa

Please sign in to comment.