-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (66 loc) · 2.01 KB
/
ci.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
name: "CI"
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
AZURE_ACCOUNT: see-heroku-env-vars
AZURE_CONTAINER: see-heroku-env-vars
AZURE_SHARED_KEY: see-heroku-env-vars
GOOGLE_GEOCODER_API_KEY: changeme
GOOGLE_MAPS_API_KEY: changeme
ALGOLIA_APP_ID: changeme
ALGOLIA_API_KEY: changeme
FCA_API_DOMAIN: 'https://register.fca.org.uk'
FCA_API_EMAIL: '[email protected]'
FCA_API_KEY: 'secret'
FCA_API_MAX_RETRIES: 5
FCA_API_TIMEOUT: 10
RAD_ADMIN_EMAIL: '[email protected]'
TAD_ADMIN_EMAIL: '[email protected]'
LOCKUP_CODEWORD: changeme
RAILS_ENV: test
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 14
- name: Install bower
run: npm install -g bower
- name: Install npm packages
run: npm install
- name: Install bowndler packages
run: bundle exec bowndler update
- name: Set up database schema
run: |
cp "${GITHUB_WORKSPACE}/config/cloud_storage.example.yml" "${GITHUB_WORKSPACE}/config/cloud_storage.yml"
cp "${GITHUB_WORKSPACE}/config/database.example.yml" "${GITHUB_WORKSPACE}/config/database.yml"
bundle exec rake db:create db:schema:load
- name: Run tests and lint Ruby
run: |
bundle exec rake
- name: Run JS tests and lint
run: npm test