From 2c3618c739e9c8acf4d1276d8874c040818e04f6 Mon Sep 17 00:00:00 2001 From: brandonzhu09 Date: Fri, 19 Apr 2024 16:53:01 -0400 Subject: [PATCH] added actions for evagram input --- ..._django_api.yaml => test_evagram_api.yaml} | 2 +- .github/workflows/test_evagram_input.yaml | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) rename .github/workflows/{test_django_api.yaml => test_evagram_api.yaml} (97%) create mode 100644 .github/workflows/test_evagram_input.yaml diff --git a/.github/workflows/test_django_api.yaml b/.github/workflows/test_evagram_api.yaml similarity index 97% rename from .github/workflows/test_django_api.yaml rename to .github/workflows/test_evagram_api.yaml index 6074d34..2c7831a 100644 --- a/.github/workflows/test_django_api.yaml +++ b/.github/workflows/test_evagram_api.yaml @@ -1,4 +1,4 @@ -name: Test Database Tool +name: Test Evagram API on: pull_request: types: diff --git a/.github/workflows/test_evagram_input.yaml b/.github/workflows/test_evagram_input.yaml new file mode 100644 index 0000000..8b39043 --- /dev/null +++ b/.github/workflows/test_evagram_input.yaml @@ -0,0 +1,45 @@ +name: Test Evagram Input Module +on: + pull_request: + types: + - opened + - synchronize + - reopened + paths: + - src/evagram/website/backend/input_app/** + - src/evagram/website/backend/api/models.py + +jobs: + build: + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:latest + env: + POSTGRES_PASSWORD: ${{secrets.DB_PASSWORD}} + ports: + - 5432:5432 + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + + steps: + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Install Evagram Input Module + run: | + python -m pip install --upgrade pip + pip install evagram_input@git+https://github.com/GEOS-ESM/evagram_input@feature/input_tool --upgrade + + - name: Install Dependencies + run: pip install . -r requirements.txt + + - name: Run Evagram Input Tests + run: python src/evagram/website/backend/manage.py test input_app.test_input_tool + env: + DB_PASSWORD: ${{secrets.DB_PASSWORD}}