Skip to content

Commit

Permalink
Add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms authored and ekohl committed Feb 15, 2021
1 parent 77b9565 commit fa60d41
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on: pull_request

jobs:
jjb:
runs-on: ubuntu-latest
name: Jenkins Job Builder
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3'
- name: Restore pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-{{ runner.python-version }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run tests
run: |
for d in theforeman.org; do
DIR="."
( cd $d && jenkins-jobs -l debug test -r $DIR )
( cd $d && jenkins-jobs test -r $DIR --config-xml -o output && find output -name config.xml -exec python ../jenkins-lint.py --xml {} + && rm -rf output )
done
for d in centos.org; do
DIR="jobs"
( cd $d && jenkins-jobs -l debug test -r $DIR )
( cd $d && jenkins-jobs test -r $DIR --config-xml -o output && find output -name config.xml -exec python ../jenkins-lint.py --xml {} + && rm -rf output )
done
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
jenkins-job-builder
lxml
requests

0 comments on commit fa60d41

Please sign in to comment.