Skip to content

Commit 4da8b4f

Browse files
committed
Try a reusable workflow.
1 parent d9083dd commit 4da8b4f

File tree

6 files changed

+32
-33
lines changed

6 files changed

+32
-33
lines changed

.github/actions/test-environment/action.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/rubocop.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test External
1+
name: RuboCop
22

33
on: [push, pull_request]
44

.github/workflows/test-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
bundler-cache: true
3131

3232
- name: Setup test environment
33-
uses: ./.github/actions/test-environment
33+
uses: ./test-setup.yaml
3434

3535
- name: Run tests
3636
timeout-minutes: 5

.github/workflows/test-external.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
bundler-cache: true
3232

3333
- name: Setup test environment
34-
uses: ./.github/actions/test-environment
34+
uses: ./test-setup.yaml
3535

3636
- name: Run tests
3737
timeout-minutes: 10

.github/workflows/test-setup.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
workflow_call:
3+
4+
jobs:
5+
setup:
6+
runs-on: ubuntu-latest
7+
8+
services:
9+
mariadb:
10+
image: mariadb
11+
ports:
12+
- 3306:3306
13+
env:
14+
MYSQL_USER: test
15+
MYSQL_PASSWORD: test
16+
MYSQL_DATABASE: test
17+
MYSQL_ROOT_PASSWORD: test
18+
options: >-
19+
--health-cmd "mysqladmin ping"
20+
--health-interval 10s
21+
--health-timeout 5s
22+
--health-retries 20
23+
24+
steps:
25+
- name: Installing dependencies (ubuntu)
26+
run: |
27+
sudo systemctl stop mysql
28+
sudo apt-get install libmariadb-dev

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
bundler-cache: true
4646

4747
- name: Setup test environment
48-
uses: ./.github/actions/test-environment
48+
uses: ./test-setup.yaml
4949

5050
- name: Run tests
5151
timeout-minutes: 10

0 commit comments

Comments
 (0)