-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathlocal-config.yml
More file actions
107 lines (90 loc) · 3.02 KB
/
local-config.yml
File metadata and controls
107 lines (90 loc) · 3.02 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: 2.1
jobs:
build:
docker:
- image: ruby:3.2.8-slim
environment:
RAILS_ENV: test
PGHOST: 127.0.0.1
PGUSER: postgres
POSTGRES_PASSWORD: postgres
- image: redis:7.2.7
environment:
REDIS_URL: redis://redis:6379/1
- image: postgres:15.8
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: touchpoints_test
parallelism: 1
working_directory: ~/repo
steps:
- run:
name: Update packages and install dependencies
command: |
apt-get update
apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
postgresql-client \
curl \
wget \
gnupg2 \
software-properties-common
- run:
name: Install Node.js
command: |
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs
- run:
name: Install Chrome (for system tests)
command: |
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
apt-get update
apt-get install -y google-chrome-stable || echo "Chrome install failed (expected on ARM64)"
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-bundle-{{ checksum "Gemfile.lock" }}
- run: bundle install
- save_cache:
paths:
- ./vendor/bundle
key: v1-bundle-{{ checksum "Gemfile.lock" }}
# Database setup
- run: bundle exec rake db:create
- run: bundle exec rake db:schema:load
# Precompile assets (to use npm packages specified in assets.rb)
- run:
name: Precompile assets
command: |
npm i
rails assets:precompile
# run tests!
- run:
name: Run tests
command: |
mkdir -p /tmp/test-results
bundle exec rspec --format progress \
--format RspecJunitFormatter \
--out /tmp/test-results/rspec.xml \
--format progress \
spec/
# Install Cloud Foundry cli (cf) before deploy step. cf is used to push to Cloud.gov
- run:
name: Install-cf-cli
command: |
curl -v -L -o cf-cli_amd64.deb 'https://packages.cloudfoundry.org/stable?release=debian64&source=github'
dpkg -i cf-cli_amd64.deb || echo "CF CLI install failed"
cf -v || echo "CF CLI not available"
# collect reports
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: coverage
workflows:
build-local:
jobs:
- build