-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (46 loc) · 1.34 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
52
---
name: Continuous Integration
on:
workflow_dispatch:
push:
pull_request:
jobs:
ci:
runs-on: ubuntu-latest
name: ${{ matrix.suite }} - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
suite:
# - 'api'
# - 'cli'
- 'test'
ruby:
- '3.2.2'
# - '3.1.4'
# - '3.0.4'
steps:
- uses: actions/checkout@v4
- name: Setup Database
run: docker compose up dbsetup
- name: Create .env
run: |
echo "UID=$(id -u)" > .env
echo "GID=$(id -g)" >> .env
- if: matrix.suite == 'api'
run: |
docker compose build --build-arg RUBY_VERSION=${{ matrix.ruby }} api
docker compose run api bundle exec rake db:migrate
docker compose run api bin/standardrb
docker compose run api bin/rspec
docker compose run api bin/cucumber
- if: matrix.suite == 'cli'
run: |
docker compose build --build-arg RUBY_VERSION=${{ matrix.ruby }} api cli
docker compose up -d api
docker compose exec api bundle exec rake db:migrate
docker compose run cli
- if: matrix.suite == 'test'
run: |
docker compose build --build-arg RUBY_VERSION=${{ matrix.ruby }} api apache
docker compose run test