-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (68 loc) · 2 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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
- name: Install dependencies
run: |
sudo apt update --fix-missing
sudo apt-get install libgdal-dev
- 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 }}
ports: ["5432:5432"]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update --fix-missing
sudo apt-get -yqq install gdal-bin libgdal-dev
npm install -g mjml
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup test database
run: bin/rails db:create db:schema:load
- name: Run tests
run: bundle exec rspec spec
- name: Upload Code Coverage
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: coverage/