forked from agu-ossi/2020-agu-oss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd537d1
commit cf95375
Showing
5 changed files
with
70 additions
and
0 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,45 @@ | ||
name: Testing | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
jobs: | ||
setup-build: | ||
name: Ex1 (${{ matrix.python-version }}, ${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: [3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Conda | ||
uses: s-weigand/setup-conda@v1 | ||
with: | ||
update-conda: true | ||
conda-channels: conda-forge | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Env | ||
shell: bash | ||
run: | | ||
python --version | ||
conda env create -f environment.yml | ||
- name: Install Our Package | ||
shell: bash | ||
run: | | ||
source activate agu-ossi-2020 | ||
pip install -e . | ||
- name: Run Tests | ||
shell: bash | ||
run: | | ||
source activate agu-ossi-2020 | ||
pytest -v . |
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 |
---|---|---|
|
@@ -16,3 +16,4 @@ dependencies: | |
- geoana | ||
- SimPEG | ||
- pymatsolver | ||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# coding=utf-8 | ||
import setuptools | ||
|
||
__version__ = '0.0.0' | ||
|
||
setuptools.setup( | ||
name="agu_oss", | ||
version=__version__, | ||
author="AGU OSS Team", | ||
description="AGU 2020 Example Package", | ||
url="https://github.com/agu-ossi/2020-agu-oss", | ||
packages=setuptools.find_packages(), | ||
) |
Empty file.
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,11 @@ | ||
import pytest | ||
|
||
# Module to be tested | ||
import agu_oss | ||
|
||
|
||
def test_division(): | ||
assert agu_oss.divide(6, 2) == 3 | ||
|
||
with pytest.raises(TypeError): | ||
agu_oss.divide(6, '2') |