diff --git a/.github/workflows/Tests.yaml b/.github/workflows/Tests.yaml new file mode 100644 index 0000000..b95cfa1 --- /dev/null +++ b/.github/workflows/Tests.yaml @@ -0,0 +1,33 @@ +name: Tests + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + + # Checkout the code at the commit (incl. branch) that triggered the workflow + - name: Checkout Repository + uses: actions/checkout@v2 + + # ------------------------------------------------------------------------------------------------------------------ + # Resemble installation section in README.md + - name: Setup Conda Environment + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: '.env' + environment-file: 'environment.yaml' + auto-activate-base: false + + - name: Install edugrad + run: | + pip install -e . + # ------------------------------------------------------------------------------------------------------------------ + + - name: Run Tests + # Execute the commands in a bash login shell, ensuring that the shell's environment is fully initialized. + shell: bash -l {0} + run: | + pytest tests \ No newline at end of file diff --git a/environment.yaml b/environment.yaml index 7cb20fc..3ccaa9a 100644 --- a/environment.yaml +++ b/environment.yaml @@ -3,3 +3,6 @@ channels: - defaults dependencies: - numpy + + # tests + - pytest diff --git a/tests/test_dummy.py b/tests/test_dummy.py new file mode 100644 index 0000000..e7bfc24 --- /dev/null +++ b/tests/test_dummy.py @@ -0,0 +1,3 @@ + +def test_dummy(): + assert True == True \ No newline at end of file