From 6a78b20d9f6ad224b657afc330b6ff1192f5da8c Mon Sep 17 00:00:00 2001 From: Steven Tendyra Date: Tue, 19 Mar 2024 11:52:37 +0000 Subject: [PATCH] Add github Actions configuration --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..3532d47b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: CI + +# We can specify which Github events will trigger a CI build +on: push + +# now define a single job 'build' (but could define more) +jobs: + + build: + + # we can also specify the OS to run tests on + runs-on: ubuntu-latest + + # a job is a seq of steps + steps: + + # Next we need to checkout out repository, and set up Python + # A 'name' is just an optional label shown in the log - helpful to clarify progress - and can be anything + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python 3.11 + uses: actions/setup-python@v2 + with: + python-version: "3.11" + + - name: Install Python dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install -r requirements.txt + + - name: Test with PyTest + run: | + python3 -m pytest --cov=catchment.models tests/test_models.py \ No newline at end of file