-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (29 loc) · 930 Bytes
/
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
name: ci
on:
workflow_dispatch:
pull_request:
jobs:
ci:
name: Build and run tests with containers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: satackey/[email protected]
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Build Docker images
run: |
docker-compose build
- name: Run with Docker Compose
run: docker-compose up -d
- name: Run tests
run: |
docker exec -e RAILS_ENV=test gala_web_1 bash -c "bundle exec rails db:test:prepare && \
bundle exec rspec --exclude-pattern=\"**/features/*_spec.rb\""
- name: Docker Compose down
run: docker-compose down
- if: always()
uses: ouzi-dev/[email protected]
with:
name: Test
status: "${{ job.status }}"