fix: [NR-NMP-523] Changing region and subregion makes wider updates to NMP file #201
Workflow file for this run
This file contains hidden or 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
| name: NMP Backend Testing | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| paths: | |
| - "backend/**" | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: ./backend | |
| jobs: | |
| setup-job: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: "true" | |
| testing: | |
| needs: setup-job | |
| runs-on: ubuntu-24.04 | |
| services: | |
| postgres: | |
| image: postgres:17@sha256:00bc86618629af00d2937fdc5a5d63db3ff8450acf52f0636ec813c7f4902929 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: postgres | |
| ports: | |
| - 5432:5432 | |
| # health check option needed here since the container does not provide one | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.14' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: Run tests | |
| env: | |
| # Match the environment variables names used in settings.py | |
| POSTGRES_DB: "postgres" | |
| POSTGRES_USER: "postgres" | |
| POSTGRES_PASSWORD: "postgres" | |
| POSTGRES_HOST: "localhost" | |
| POSTGRES_PORT: "5432" | |
| DJANGO_SETTINGS_MODULE: "config.settings" | |
| run: | | |
| python manage.py test apps.crops.tests.test_models apps.manures.tests.test_models apps.animals.tests.test_models apps.fertilizers.tests.test_models |