-
Notifications
You must be signed in to change notification settings - Fork 40
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 #45 from NLeSC/44-ci-to-github-actions
add CI github action (refs #44)
- Loading branch information
Showing
4 changed files
with
93 additions
and
34 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,71 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: CI Build | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
first_check: | ||
name: first code check / python-3.8 / ubuntu-latest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Python info | ||
run: | | ||
which python | ||
python --version | ||
- name: Install dependiencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install mcfly prospector nose pandas | ||
- name: Show pip list | ||
run: | | ||
pip list | ||
- name: Check style against standards using prospector (only warn for now, but never fail) | ||
shell: bash -l {0} | ||
run: prospector --profile linter_profile -o grouped -o pylint:pylint-report.txt --zero-exit | ||
- name: Run unit tests | ||
run: | | ||
nosetests | ||
basic_checks: | ||
name: Run tests across OS and versions / python-${{ matrix.python-version }} / ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
needs: first_check | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
python-version: ['3.6', '3.7', '3.8'] | ||
exclude: | ||
# already tested in first_check job | ||
- python-version: 3.8 | ||
os: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Python info | ||
run: | | ||
which python | ||
python --version | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install mcfly prospector nose pandas | ||
- name: Show pip list | ||
run: | | ||
pip list | ||
- name: Run unit tests | ||
run: | | ||
nosetests |
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
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,21 @@ | ||
output-format: json | ||
|
||
strictness: medium | ||
test-warnings: true | ||
doc-warnings: false | ||
|
||
pylint: | ||
disable: | ||
- wrong-import-position | ||
- redefined-builtin | ||
- bare-except | ||
- unused-argument | ||
- dangerous-default-value | ||
- too-many-branches | ||
- too-many-arguments | ||
- too-many-locals | ||
- protected-access | ||
|
||
pep8: | ||
disable: | ||
- E722 |