generated from BCDevOps/opendev-template
-
Notifications
You must be signed in to change notification settings - Fork 3
86 lines (83 loc) · 2.62 KB
/
pull-request.yml
File metadata and controls
86 lines (83 loc) · 2.62 KB
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
81
82
83
84
85
86
name: Pull Request Workflow
on:
pull_request:
branches: ["main", "develop"]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
name: Run RSpec Test Suite
environment: "CI-test"
env:
RAILS_ENV: test
DATABASE_URL: postgres://user:password@localhost:5432/test_db
ELASTICSEARCH_URL: http://localhost:9200
REDIS_URL: redis://localhost:6379/0
RATE_LIMIT_DEV_REDIS_URL: redis://localhost:6379/1
SIMPLE_FEED_DEV_REDIS_URL: redis://localhost:6379/2
CONSIGNO_URL: https://consignostub.dev-hous-permit-portal.com/stub/api/v1
GEO_ALR_REST_URL: https://alr_rest_url_stub/arcserver/rest/services
GEO_LTSA_PARCELMAP_REST_URL: https://ltsa_parcel_map_url_stub/arcserver/rest/services
MIN_ZERO_CARBON_STEP: "1"
MAX_ZERO_CARBON_STEP: "5"
MIN_ENERGY_STEP: "3"
MAX_ENERGY_STEP: "4"
# The following keys are stub keys
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY: "ucZeHIu5E5Fd6mTRQjBzfc1qu6qzvA"
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY: "ucZeHIu5E5Fd6mTRQjBzfc1qu6qzvA"
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT: "ucZeHIu5E5Fd6mTRQjBzfc1qu6qzvA"
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: test_db
POSTGRES_USER: user
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7.2.5
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.16
ports:
- 9200:9200
options: >-
-e "discovery.type=single-node"
-e "xpack.security.enabled=false"
steps:
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y git-lfs libproj-dev libgeos-dev proj-bin
git lfs install
- name: Checkout Code
uses: actions/checkout@v3
with:
lfs: true
- name: Set up Ruby 3.2.5
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.5"
- name: Install Dependencies
run: |
bundle install
- name: Setup Test Database
run: |
bundle exec rails db:create
bundle exec rails db:schema:load
bundle exec rails db:migrate
- name: Run RSpec
run: |
bundle exec rspec