Merge pull request #571 from wri/fix/uploaded-document-issue #2304
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
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| APP_URL: http://localhost:3000 | |
| FRONTEND_URL: http://localhost:5000 | |
| SENDGRID_API_KEY: asdf | |
| CONTACT_EMAIL: nomail@nomail.com | |
| RESPONSIBLE_EMAIL: test@nomail.com | |
| AUTH_SECRET: secret | |
| RAILS_ENV: test | |
| SECRET_KEY_BASE: f54c9d76c42e397e17cbc0d0a024da5a762a7a0d934839b417a77dac6fda65a49a37b32bcd229ac5fd5c1fedef8ed6acf7a57ed6465d6339862cdc0dfab8886f | |
| name: Tests | |
| on: push | |
| jobs: | |
| e2e-setup: | |
| name: Check E2E Setup | |
| runs-on: ubuntu-22.04 | |
| services: | |
| postgres: | |
| image: postgis/postgis:12-3.1-alpine | |
| env: | |
| POSTGRES_USER: ${{ env.POSTGRES_USER }} | |
| POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
| ports: ["5432:5432"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: libgdal-dev | |
| version: 1.0 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Setup E2E database | |
| run: bin/rails e2e:setup RAILS_ENV=e2e | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-22.04 | |
| services: | |
| postgres: | |
| image: postgis/postgis:12-3.1-alpine | |
| env: | |
| POSTGRES_USER: ${{ env.POSTGRES_USER }} | |
| POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
| RAILS_ENV: test | |
| ports: ["5432:5432"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: gdal-bin libgdal-dev | |
| version: 1.0 | |
| - name: Install other dependencies | |
| run: | | |
| npm install -g mjml | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Setup test database | |
| run: bin/rake parallel:setup | |
| - name: Run tests | |
| run: bin/rake parallel:spec | |
| - name: Upload Code Coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: code-coverage | |
| path: coverage/ |