-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathsimple-local-config.yml
More file actions
83 lines (70 loc) · 2.32 KB
/
simple-local-config.yml
File metadata and controls
83 lines (70 loc) · 2.32 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
version: 2.1
jobs:
build:
docker:
- image: ruby:3.2.8-slim
environment:
RAILS_ENV: test
PGHOST: localhost
PGUSER: postgres
REDIS_URL: redis://localhost:6379/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 \
git
- run:
name: Install Node.js
command: |
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs
- checkout
- run:
name: Bundle install
command: bundle install
- run:
name: Install npm packages
command: npm install
- run:
name: Setup database (skip if no local DB)
command: |
echo "Skipping database setup for local run"
echo "In real CI, this would run: bundle exec rake db:create db:schema:load"
- run:
name: Precompile assets
command: |
RAILS_ENV=test rails assets:precompile
- run:
name: Run tests (without database-dependent tests)
command: |
mkdir -p /tmp/test-results
echo "Running RSpec tests..."
bundle exec rspec --format progress \
--format RspecJunitFormatter \
--out /tmp/test-results/rspec.xml \
--format progress \
spec/ || echo "Some tests may have failed due to missing database"
- run:
name: Install Cloud Foundry CLI
command: |
curl -v -L -o cf-cli_amd64.deb 'https://packages.cloudfoundry.org/stable?release=debian64&source=github' || true
dpkg -i cf-cli_amd64.deb || echo "CF CLI install failed (expected on ARM64)"
cf -v || echo "CF CLI not available"
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: coverage
workflows:
build-simple:
jobs:
- build