Skip to content

Commit 8d75cfa

Browse files
committed
clean up ci test config files, fixed artifact naming
1 parent 1b4c15f commit 8d75cfa

10 files changed

+96
-16
lines changed

.github/workflows/dockerpush.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
- uses: actions/checkout@v2
1010
- name: Run tests
1111
run: |
12-
docker-compose run --rm test_6_1_ruby_3_0
12+
docker-compose -f ./ci/docker-compose.ci.yml run --rm test_6_1_ruby_3_0
1313
- name: Upload lock files
1414
uses: actions/upload-artifact@v2
1515
with:
16-
name: lockfiles
16+
name: lockfiles_test_6_1_ruby_3_0
1717
path: |
1818
yarn.lock
1919
Gemfile.lock
@@ -23,11 +23,11 @@ jobs:
2323
- uses: actions/checkout@v2
2424
- name: Run tests
2525
run: |
26-
docker-compose run --rm test_6_1_ruby_2_7
26+
docker-compose -f ./ci/docker-compose.ci.yml run --rm test_6_1_ruby_2_7
2727
- name: Upload lock files
2828
uses: actions/upload-artifact@v2
2929
with:
30-
name: lockfiles
30+
name: lockfiles_test_6_1_ruby_2_7
3131
path: |
3232
yarn.lock
3333
Gemfile.lock
@@ -37,11 +37,11 @@ jobs:
3737
- uses: actions/checkout@v2
3838
- name: Run tests
3939
run: |
40-
docker-compose run --rm test_6_0_ruby_2_6
40+
docker-compose -f ./ci/docker-compose.ci.yml run --rm test_6_0_ruby_2_6
4141
- name: Upload lock files
4242
uses: actions/upload-artifact@v2
4343
with:
44-
name: lockfiles
44+
name: lockfiles_test_6_0_ruby_2_6
4545
path: |
4646
yarn.lock
4747
Gemfile.lock
@@ -51,11 +51,11 @@ jobs:
5151
- uses: actions/checkout@v2
5252
- name: Run tests
5353
run: |
54-
docker-compose run --rm test_5_2_ruby_2_6
54+
docker-compose -f ./ci/docker-compose.ci.yml run --rm test_5_2_ruby_2_6
5555
- name: Upload lock files
5656
uses: actions/upload-artifact@v2
5757
with:
58-
name: lockfiles
58+
name: lockfiles_test_5_2_ruby_2_6
5959
path: |
6060
yarn.lock
6161
Gemfile.lock

Dockerfile.test_5_2_ruby_2_6 renamed to ci/Dockerfile.test_5_2_ruby_2_6

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ WORKDIR /app
1010

1111
COPY ./lib/ /app/lib/
1212
COPY matestack-ui-core.gemspec /app/
13-
COPY Gemfile.5.2 /app/Gemfile
13+
COPY ./ci/Gemfile.5.2 /app/Gemfile
1414
RUN bundle install
1515

1616
COPY package.json /app/
@@ -34,11 +34,14 @@ ENV CHROME_BIN=/usr/bin/chromium-browser \
3434

3535
RUN mv Gemfile _Gemfile
3636
RUN mv Gemfile.lock _Gemfile.lock
37+
RUN mv yarn.lock _yarn.lock
3738
COPY . /app
3839
RUN rm Gemfile
3940
RUN rm Gemfile.lock
41+
RUN rm yarn.lock
4042
RUN mv _Gemfile Gemfile
4143
RUN mv _Gemfile.lock Gemfile.lock
44+
RUN mv _yarn.lock yarn.lock
4245

4346
RUN rm /app/spec/dummy/db/schema.rb
4447

Dockerfile.test_6_0_ruby_2_6 renamed to ci/Dockerfile.test_6_0_ruby_2_6

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ WORKDIR /app
1010

1111
COPY ./lib/ /app/lib/
1212
COPY matestack-ui-core.gemspec /app/
13-
COPY Gemfile.6.0 /app/Gemfile
13+
COPY ./ci/Gemfile.6.0 /app/Gemfile
1414
RUN bundle install
1515

1616
COPY package.json /app/
@@ -34,11 +34,14 @@ ENV CHROME_BIN=/usr/bin/chromium-browser \
3434

3535
RUN mv Gemfile _Gemfile
3636
RUN mv Gemfile.lock _Gemfile.lock
37+
RUN mv yarn.lock _yarn.lock
3738
COPY . /app
3839
RUN rm Gemfile
3940
RUN rm Gemfile.lock
41+
RUN rm yarn.lock
4042
RUN mv _Gemfile Gemfile
4143
RUN mv _Gemfile.lock Gemfile.lock
44+
RUN mv _yarn.lock yarn.lock
4245

4346
RUN rm /app/spec/dummy/db/schema.rb
4447

Dockerfile.test_6_1_ruby_2_7 renamed to ci/Dockerfile.test_6_1_ruby_2_7

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ WORKDIR /app
1010

1111
COPY ./lib/ /app/lib/
1212
COPY matestack-ui-core.gemspec /app/
13-
COPY Gemfile.6.1 /app/Gemfile
13+
COPY ./ci/Gemfile.6.1 /app/Gemfile
1414
RUN bundle install
1515

1616
COPY package.json /app/
@@ -34,11 +34,14 @@ ENV CHROME_BIN=/usr/bin/chromium-browser \
3434

3535
RUN mv Gemfile _Gemfile
3636
RUN mv Gemfile.lock _Gemfile.lock
37+
RUN mv yarn.lock _yarn.lock
3738
COPY . /app
3839
RUN rm Gemfile
3940
RUN rm Gemfile.lock
41+
RUN rm yarn.lock
4042
RUN mv _Gemfile Gemfile
4143
RUN mv _Gemfile.lock Gemfile.lock
44+
RUN mv _yarn.lock yarn.lock
4245

4346
RUN rm /app/spec/dummy/db/schema.rb
4447

Dockerfile.test_6_1_ruby_3_0 renamed to ci/Dockerfile.test_6_1_ruby_3_0

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ WORKDIR /app
1010

1111
COPY ./lib/ /app/lib/
1212
COPY matestack-ui-core.gemspec /app/
13-
COPY Gemfile.6.1 /app/Gemfile
13+
COPY ./ci/Gemfile.6.1 /app/Gemfile
1414
RUN bundle install
1515

1616
COPY package.json /app/
@@ -34,11 +34,15 @@ ENV CHROME_BIN=/usr/bin/chromium-browser \
3434

3535
RUN mv Gemfile _Gemfile
3636
RUN mv Gemfile.lock _Gemfile.lock
37+
RUN mv yarn.lock _yarn.lock
3738
COPY . /app
3839
RUN rm Gemfile
3940
RUN rm Gemfile.lock
41+
RUN rm yarn.lock
4042
RUN mv _Gemfile Gemfile
4143
RUN mv _Gemfile.lock Gemfile.lock
44+
RUN mv _yarn.lock yarn.lock
45+
4246

4347
RUN rm /app/spec/dummy/db/schema.rb
4448

File renamed without changes.
File renamed without changes.
File renamed without changes.

ci/docker-compose.ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
version: '3'
2+
services:
3+
4+
test_5_2_ruby_2_6:
5+
build:
6+
context: ../
7+
dockerfile: ./ci/Dockerfile.test_5_2_ruby_2_6
8+
environment:
9+
RAILS_ENV: test
10+
links:
11+
- "postgres_test_5_2_ruby_2_6:postgres_test"
12+
command: sh -c "bundle exec rake db:drop && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rspec spec/test"
13+
user: ${CURRENT_UID}
14+
15+
test_6_0_ruby_2_6:
16+
build:
17+
context: ../
18+
dockerfile: ./ci/Dockerfile.test_6_0_ruby_2_6
19+
environment:
20+
RAILS_ENV: test
21+
links:
22+
- "postgres_test_6_0_ruby_2_6:postgres_test"
23+
command: sh -c "bundle exec rake db:drop && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rspec spec/test"
24+
user: ${CURRENT_UID}
25+
26+
test_6_1_ruby_2_7:
27+
build:
28+
context: ../
29+
dockerfile: ./ci/Dockerfile.test_6_1_ruby_2_7
30+
environment:
31+
RAILS_ENV: test
32+
links:
33+
- "postgres_test_6_1_ruby_2_7:postgres_test"
34+
command: sh -c "bundle exec rake db:drop && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rspec spec/test"
35+
user: ${CURRENT_UID}
36+
37+
test_6_1_ruby_3_0:
38+
build:
39+
context: ../
40+
dockerfile: ./ci/Dockerfile.test_6_1_ruby_3_0
41+
environment:
42+
RAILS_ENV: test
43+
links:
44+
- "postgres_test_6_1_ruby_3_0:postgres_test"
45+
command: sh -c "bundle exec rake db:drop && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rspec spec/test"
46+
user: ${CURRENT_UID}
47+
48+
postgres_test_base: &postgres_test_base
49+
image: postgres
50+
expose:
51+
- 5432
52+
environment:
53+
POSTGRES_USER: postgres
54+
POSTGRES_PASSWORD: postgres
55+
POSTGRES_DB: test
56+
57+
postgres_test_6_1_ruby_3_0:
58+
<<: *postgres_test_base
59+
60+
postgres_test_6_1_ruby_2_7:
61+
<<: *postgres_test_base
62+
63+
postgres_test_6_0_ruby_2_6:
64+
<<: *postgres_test_base
65+
66+
postgres_test_5_2_ruby_2_6:
67+
<<: *postgres_test_base

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ services:
5353
test_5_2_ruby_2_6:
5454
build:
5555
context: .
56-
dockerfile: ./Dockerfile.test_5_2_ruby_2_6
56+
dockerfile: ./ci/Dockerfile.test_5_2_ruby_2_6
5757
environment:
5858
RAILS_ENV: test
5959
links:
@@ -64,7 +64,7 @@ services:
6464
test_6_0_ruby_2_6:
6565
build:
6666
context: .
67-
dockerfile: ./Dockerfile.test_6_0_ruby_2_6
67+
dockerfile: ./ci/Dockerfile.test_6_0_ruby_2_6
6868
environment:
6969
RAILS_ENV: test
7070
links:
@@ -75,7 +75,7 @@ services:
7575
test_6_1_ruby_2_7:
7676
build:
7777
context: .
78-
dockerfile: ./Dockerfile.test_6_1_ruby_2_7
78+
dockerfile: ./ci/Dockerfile.test_6_1_ruby_2_7
7979
environment:
8080
RAILS_ENV: test
8181
links:
@@ -86,7 +86,7 @@ services:
8686
test_6_1_ruby_3_0:
8787
build:
8888
context: .
89-
dockerfile: ./Dockerfile.test_6_1_ruby_3_0
89+
dockerfile: ./ci/Dockerfile.test_6_1_ruby_3_0
9090
environment:
9191
RAILS_ENV: test
9292
links:

0 commit comments

Comments
 (0)