-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (43 loc) · 1.24 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
name: Continuous Integration
on:
workflow_dispatch:
push:
pull_request:
branches:
- 'main'
jobs:
ci:
if: ${{ github.event_name == 'push' || github.event.pull_request.merged == true }}
runs-on: ubuntu-latest
name: ${{ matrix.suite }} - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
suite:
- 'app'
- 'client-tests'
- 'test'
ruby:
- '3.2.2'
steps:
- uses: actions/checkout@v4
- name: Create .env
run: |
echo "UID=$(id -u)" > .env
echo "GID=$(id -g)" >> .env
- if: matrix.suite == 'app'
run: |
docker compose build --build-arg RUBY_VERSION=${{ matrix.ruby }} app-dev
docker compose run app-dev standardrb
docker compose up dbsetup
docker compose run app-dev
- if: matrix.suite == 'client-tests'
run: |
docker compose build --build-arg RUBY_VERSION=${{ matrix.ruby }} client-tests
docker compose run client-tests
- if: matrix.suite == 'test'
run: |
docker compose build --build-arg RUBY_VERSION=${{ matrix.ruby }} app apache
docker compose up dbsetup
docker compose run test