diff --git a/.github/workflows/harvest-restrictions.yaml b/.github/workflows/harvest-restrictions.yaml index 0cf50a4..98db776 100644 --- a/.github/workflows/harvest-restrictions.yaml +++ b/.github/workflows/harvest-restrictions.yaml @@ -13,19 +13,29 @@ env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} jobs: - download: + harvest-restrictions: runs-on: ubuntu-latest + name: test container: ghcr.io/bcgov/harvest-restrictions:main environment: production + services: + postgres: + image: postgis/postgis:16-3.4 + env: + POSTGRES_PASSWORD: postgres + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + env: + DEBIAN_FRONTEND: noninteractive steps: - uses: actions/checkout@v4 - - name: Download sources to file - run: /venv/bin/python download.py sources.json -v - process: - runs-on: ubuntu-latest - container: ghcr.io/bcgov/harvest-restrictions:main - environment: production - steps: - - uses: actions/checkout@v4 - - name: Process overlays and dump results to file - run: process.sh \ No newline at end of file + - name: Download + run: | + /venv/bin/python download.py sources.json -v + - name: Process overlays + run: | + ./process.sh \ No newline at end of file diff --git a/.github/workflows/test-and-validate.yaml b/.github/workflows/test-and-validate.yaml index 1941b9c..8659927 100644 --- a/.github/workflows/test-and-validate.yaml +++ b/.github/workflows/test-and-validate.yaml @@ -3,7 +3,7 @@ on: push: branches: [ main] paths: - - '.github/workflows/test.yaml' + - '.github/workflows/test-and-validate.yaml' - 'requirements*.txt' - 'download.py' - 'test_download.py' @@ -12,7 +12,7 @@ on: pull_request: branches: [ main ] paths: - - '.github/workflows/test.yaml' + - '.github/workflows/test-and-validate.yaml' - 'requirements*.txt' - 'download.py' - 'test_download.py' @@ -33,6 +33,7 @@ jobs: runs-on: ubuntu-latest name: test container: ghcr.io/bcgov/harvest-restrictions:main + environment: production services: postgres: image: postgis/postgis:16-3.4 @@ -46,8 +47,6 @@ jobs: --health-retries 5 env: DEBIAN_FRONTEND: noninteractive - strategy: - fail-fast: false steps: - uses: actions/checkout@v4 - name: Install test dependencies