Skip to content

Commit d621982

Browse files
committed
Move docker-compose test files into a folder
1 parent cc19f8a commit d621982

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

.github/workflows/run-tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ on:
99

1010
jobs:
1111
test-apache-container:
12-
name: Test on database ${{ matrix.database-image }}
12+
name: Test (${{ matrix.configuration }}) on database ${{ matrix.database-image }}
1313
runs-on: ubuntu-latest
1414
strategy:
15+
fail-fast: false
1516
matrix:
1617
database-image: ["mariadb:10.4", "mysql:5.7", "mariadb:latest", "mysql:latest"]
18+
configuration: ["default", "one-host"]
1719

1820
steps:
1921
- uses: actions/checkout@v3
2022
- name: Build images
21-
run: docker-compose -f docker-compose.testing.yml build
22-
- name: Run normal tests
23-
run: docker-compose -f docker-compose.testing.yml up --build --abort-on-container-exit --exit-code-from=sut
23+
working-directory: ./testing/
24+
run: docker-compose -f ./docker-compose/docker-compose.testing-${{ matrix.configuration }}.yml build
25+
- name: Run ${{ matrix.configuration }} tests
26+
working-directory: ./testing/
27+
run: docker-compose -f ./docker-compose/docker-compose.testing-${{ matrix.configuration }}.yml up --build --abort-on-container-exit --exit-code-from=sut
2428
env:
2529
DB: ${{ matrix.database-image }}
26-
- name: Run one host tests
27-
run: docker-compose -f docker-compose.testing-one-host.yml up --build --abort-on-container-exit --exit-code-from=sut
28-
env:
29-
DB: ${{ matrix.database-image }}

docker-compose.testing.yml renamed to testing/docker-compose/docker-compose.testing-default.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ services:
1515
networks:
1616
testing:
1717
volumes:
18-
- ./testing/testing.cnf:/etc/mysql/conf.d/testing.cnf:ro
18+
- ../testing.cnf:/etc/mysql/conf.d/testing.cnf:ro
1919
tmpfs:
2020
- /var/lib/mysql:rw,noexec,nosuid,size=300m
2121

2222
phpmyadmin:
2323
build:
24-
context: apache
24+
context: ../../apache
2525
container_name: phpmyadmin_testing_apache
2626
environment:
2727
PMA_ARBITRARY: 1
2828
UPLOAD_LIMIT: 123M
2929
MAX_EXECUTION_TIME: 125
3030
HIDE_PHP_VERSION: 1
3131
volumes:
32-
- ./testing/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
32+
- ../config.user.inc.php:/etc/phpmyadmin/config.user.inc.php:ro
3333
healthcheck:
3434
test: ["CMD", "curl", "-Ss", "http://localhost/robots.txt"]
3535
start_period: 5s
@@ -49,7 +49,7 @@ services:
4949
db_server:
5050
condition: service_healthy
5151
build:
52-
context: testing
52+
context: ../
5353
command: "/tests/testing/test-docker.sh"
5454
networks:
5555
testing:
@@ -60,7 +60,7 @@ services:
6060
TESTSUITE_PORT: 80
6161
TESTSUITE_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
6262
volumes:
63-
- ./:/tests:ro
63+
- ../../:/tests:ro
6464
- /var/run/docker.sock:/var/run/docker.sock
6565
working_dir: /tests
6666

docker-compose.testing-one-host.yml renamed to testing/docker-compose/docker-compose.testing-one-host.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ services:
1515
networks:
1616
testing:
1717
volumes:
18-
- ./testing/testing.cnf:/etc/mysql/conf.d/testing.cnf:ro
18+
- ./testing.cnf:/etc/mysql/conf.d/testing.cnf:ro
1919
tmpfs:
2020
- /var/lib/mysql:rw,noexec,nosuid,size=300m
2121

2222
phpmyadmin:
2323
build:
24-
context: apache
24+
context: ../../apache
2525
container_name: phpmyadmin_testing_apache
2626
environment:
2727
PMA_HOST: db_server
2828
UPLOAD_LIMIT: 123M
2929
MAX_EXECUTION_TIME: 125
3030
HIDE_PHP_VERSION: 1
3131
volumes:
32-
- ./testing/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
32+
- ../config.user.inc.php:/etc/phpmyadmin/config.user.inc.php:ro
3333
healthcheck:
3434
test: ["CMD", "curl", "-Ss", "http://localhost/robots.txt"]
3535
start_period: 5s
@@ -49,7 +49,7 @@ services:
4949
db_server:
5050
condition: service_healthy
5151
build:
52-
context: testing
52+
context: ../
5353
command: "/tests/testing/test-docker.sh"
5454
networks:
5555
testing:
@@ -60,7 +60,7 @@ services:
6060
PMA_HOST: phpmyadmin_testing_db
6161
PMA_PORT: 3306
6262
volumes:
63-
- ./:/tests:ro
63+
- ../../:/tests:ro
6464
- /var/run/docker.sock:/var/run/docker.sock
6565
working_dir: /tests
6666

0 commit comments

Comments
 (0)