Skip to content

Commit cbb2fc9

Browse files
Segregate local only services to a separate file so we do not break CI
1 parent 6a98a46 commit cbb2fc9

3 files changed

Lines changed: 21 additions & 12 deletions

File tree

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,23 @@ docker build -t alma-user-load .
121121
### Run the test suite via Docker:
122122
```sh
123123
# Run rspec:
124-
> docker compose run --rm shell bundle exec rspec
124+
> docker compose -f docker-compose.local.yml run --rm shell bundle exec rspec
125125

126126
# Run a single spec file:
127-
> docker compose run --rm shell bundle exec rspec spec/lib/ucpath_spec.rb
127+
> docker compose -f docker-compose.local.yml run --rm shell bundle exec rspec spec/lib/ucpath_spec.rb
128128

129129
# Run a specific test (by line number)
130-
> docker compose run --rm shell bundle exec rspec spec/lib/helpers_spec.rb:34
130+
> docker compose -f docker-compose.local.yml run --rm shell bundle exec rspec spec/lib/helpers_spec.rb:34
131131
```
132132

133+
### For convenience, setup an alias:
134+
```sh
135+
# Add alias:
136+
> alias drspec='docker compose -f docker-compose.local.yml run --rm shell bundle exec rspec'
137+
138+
# Run via alias:
139+
drspec spec/lib/ucpath_spec.rb:327
140+
```
133141

134142
Note - to run the test suite you need to change the LDAP setting in your `.env` file
135143
> \# For testing:

docker-compose.local.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
shell:
3+
build:
4+
context: .
5+
target: development
6+
init: true
7+
working_dir: /opt/app
8+
volumes:
9+
- ./:/opt/app
10+
entrypoint: []

docker-compose.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,3 @@ services:
1313
- ./:/opt/app
1414
ports:
1515
- 3000:3000
16-
shell:
17-
build:
18-
context: .
19-
target: development
20-
init: true
21-
working_dir: /opt/app
22-
volumes:
23-
- ./:/opt/app
24-
entrypoint: []

0 commit comments

Comments
 (0)