-
Notifications
You must be signed in to change notification settings - Fork 6
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 #381 from radical-cybertools/fix/ci
updated CI
- Loading branch information
Showing
5 changed files
with
96 additions
and
95 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,76 @@ | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ devel ] | ||
pull_request: | ||
branches: [ devel ] | ||
|
||
jobs: | ||
|
||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m venv testenv | ||
. testenv/bin/activate | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install -r requirements-ci.txt | ||
- name: Lint with flake8 and pylint | ||
run: | | ||
. testenv/bin/activate | ||
radical-stack | ||
LOG=`git log -n 1 | grep Merge` || echo 'no merging' && exit 0 | ||
NEW=`echo $LOG | cut -d ' ' -f2` | ||
OLD=`echo $LOG | cut -d ' ' -f3` | ||
(test -z "$NEW" || test -z "$OLD") && echo 'nothing to lint' && exit 0 | ||
DIFF=`git diff --name-only --diff-filter=db $NEW..$OLD` | ||
FILTERED=$(for f in $DIFF; do echo $f; done | \ | ||
grep -e '\.py$' | sed "s|^|$PWD/|") | ||
test -z "$FILTERED" && echo 'nothing to lint' && exit 0 | ||
flake8 $FILTERED | ||
pylint $FILTERED | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m venv testenv | ||
. testenv/bin/activate | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install -r requirements-ci.txt | ||
- name: Test with pytest | ||
env: | ||
RADICAL_DEBUG: TRUE | ||
RADICAL_DEBUG_HELPER: TRUE | ||
LOC: testenv/lib/python${{ matrix.python-version }}/site-packages | ||
run: | | ||
. testenv/bin/activate | ||
radical-stack | ||
coverage run --include=$LOC/radical/utils/* -m pytest -ra -vvv --showlocals tests/unittests/ | ||
coverage xml | ||
- uses: codecov/codecov-action@v3 | ||
if: ${{ matrix.python-version == '3.7' }} | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
files: ./coverage.xml | ||
|
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
|
||
# provided branches for RCT components can be edited, | ||
# if there is a dependency with non-devel branch | ||
|
||
# default RCT branch for CI runs is "devel" | ||
|
||
radical.saga @ git+https://github.com/radical-cybertools/radical.saga@devel | ||
radical.pilot @ git+https://github.com/radical-cybertools/radical.pilot@devel | ||
|
||
# RP from the current branch | ||
. | ||
|
||
pytest | ||
pytest-timeout | ||
pylint | ||
flake8 | ||
flake8-per-file-ignores | ||
coverage | ||
pudb | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
colorama | ||
msgpack | ||
netifaces | ||
|