-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace travis with GH actions and refactor tests
Also remove ERT as dependency
- Loading branch information
1 parent
a195124
commit edc07c9
Showing
24 changed files
with
226 additions
and
90 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,22 @@ | ||
name: Build | ||
description: builds xtgeoapp-grd3dmaps | ||
|
||
inputs: | ||
python-version: | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Upgrade pip | ||
run: python -m pip install pip -U | ||
shell: bash | ||
|
||
- name: install xtgeoapp-grd3maps | ||
run: pip install . | ||
shell: bash |
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,15 @@ | ||
name: "Set up for tests" | ||
description: "Set up the xtgeoapp-grd3dmaps test environment" | ||
|
||
inputs: | ||
python-version: | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: "./.github/actions/build-xtgeoapp-grd3dmaps" | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
- run: pip install -r requirements/requirements_tests.txt | ||
shell: bash |
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,31 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
testing: | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
os: [ubuntu-latest] | ||
include: | ||
- os: macos-latest | ||
python-version: 3.8 | ||
- os: windows-latest | ||
python-version: 3.8 | ||
- os: ubuntu-latest | ||
python-version: 3.7 | ||
- os: ubuntu-latest | ||
python-version: 3.9 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: "./.github/actions/test_setup" | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run test | ||
run: python -m pytest tests/test_scripts --disable-warnings -x |
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,26 @@ | ||
name: Test vs ERT | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
test_vs_ert: | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.8] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: "./.github/actions/test_setup" | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run test vs ERT | ||
# the promise install is needed due to bug in ERT installer; remove when fixed | ||
run: > | ||
python -m pip install ert && | ||
python -m pip install promise && | ||
python -m pytest tests/test_vs_ert --disable-warnings -x |
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,35 @@ | ||
# NOTE: you have to use single-quoted strings in TOML for regular expressions. | ||
|
||
[tool.black] | ||
line-length = 88 | ||
target-version = ['py36', 'py37', 'py38'] | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
\.eggs | ||
| \.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
# The following are specific to Black, you probably don't want those. | ||
| blib2to3 | ||
| tests/data | ||
| tests/yaml | ||
| profiling | ||
)/ | ||
''' | ||
|
||
[build-system] | ||
requires = [ | ||
"pip>=19.1.1", | ||
"setuptools>=43", | ||
"wheel", | ||
"setuptools_scm", | ||
"Sphinx", | ||
"sphinx-rtd-theme", | ||
] |
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,13 @@ | ||
#pytest tests/tests* -o log_cli=true -s | ||
|
||
[pytest] | ||
minversion = 6.0 | ||
addopts = --verbose | ||
log_cli = False | ||
log_cli_format = %(levelname)8s (%(relativeCreated)6.0fms) %(filename)44s [%(funcName)40s()] %(lineno)4d >> %(message)s | ||
log_cli_level = INFO | ||
testpaths = | ||
tests | ||
markers = | ||
integration: Integration tests | ||
requires_ert: A test requiring ert in the environment |
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,5 +1,4 @@ | ||
PyYAML | ||
ert | ||
numpy | ||
pyyaml | ||
xtgeo | ||
xtgeoviz |
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,5 @@ | ||
pip>=19.1.1 | ||
setuptools>=43 | ||
setuptools_scm | ||
sphinx | ||
sphinx-rtd-theme |
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,4 @@ | ||
pytest-runner | ||
setuptools>=43 | ||
setuptools_scm | ||
wheel |
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 @@ | ||
pytest |
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
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
Oops, something went wrong.