Skip to content

Commit

Permalink
Merge pull request #5 from tostenzel/3-add-cicd
Browse files Browse the repository at this point in the history
Add Tests workflow
  • Loading branch information
tostenzel authored Jan 1, 2024
2 parents 51249c2 + 6035d8f commit 239c193
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ channels:
- defaults
dependencies:
- numpy

# tests
- pytest
3 changes: 3 additions & 0 deletions tests/test_dummy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

def test_dummy():
assert True == True

0 comments on commit 239c193

Please sign in to comment.