File tree 1 file changed +28
-5
lines changed
1 file changed +28
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- image : circleci/ ruby:3.0.3-node-browsers
2
+ image : " ruby:3.1 "
3
3
4
4
variables :
5
+ RAILS_ENV : test
5
6
CACHE_FALLBACK_KEY : " $CI_COMMIT_REF_SLUG"
6
7
7
8
before_script :
9
+ # Setup Node.js
10
+ - curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
11
+ - bash nodesource_setup.sh
12
+ - apt-get install -y nodejs
13
+
14
+ # Install Yarn
15
+ - npm config set registry https://registry.npmmirror.com/ --global
16
+ - npm install --global yarn
17
+
18
+ # Verify installations
19
+ - node -v
20
+ - yarn -v
21
+ - ruby -v
22
+ - which ruby
23
+
24
+ # Setup Bundler
25
+ - gem install bundler --no-document
8
26
- bundle config set path 'vendor' # Install dependencies into ./vendor/ruby
27
+ - bundle install --jobs $(nproc)
28
+
29
+ # Install JavaScript dependencies
30
+ - yarn install --cache-folder .yarn-cache
9
31
10
32
stages :
11
33
- test
@@ -22,12 +44,13 @@ test:
22
44
files :
23
45
- yarn.lock
24
46
paths :
25
- - " .yarn-cache/"
47
+ - .yarn-cache/
26
48
script :
27
- - bundle install -j $(nproc)
28
- - yarn install --cache-folder .yarn-cache
49
+ - bundle exec standardrb
29
50
- bin/rails db:drop RAILS_ENV=test
30
51
- bin/rails db:setup RAILS_ENV=test
31
- - bundle exec standardrb
32
52
- bin/rails test
33
53
- bin/rails test:system
54
+ only :
55
+ - main
56
+ - merge_requests
You can’t perform that action at this time.
0 commit comments