forked from rubyforgood/casa
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.26 KB
/
docker.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
name: docker
on:
push:
branches:
- main
paths-ignore:
- "doc/**"
- "**/*.md"
pull_request:
branches:
- main
paths-ignore:
- "doc/**"
- "**/*.md"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docker:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
RAILS_ENV: test
TEST_MAX_DURATION: 60
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create downloads folder
run: |
mkdir -p tmp/downloads
chmod 777 tmp tmp/downloads
- name: docker UP
run: docker-compose up -d
- name: db:reset
run: docker-compose exec -T web rails db:reset
- name: compile assets
run: docker-compose exec -T web bundle exec rails assets:precompile
- name: Test
run: docker-compose exec -T web bundle exec rspec spec --fail-fast
- name: Archive selenium screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: selenium-screenshots
path: |
${{ github.workspace }}/tmp/capybara/*.png
${{ github.workspace }}/tmp/capybara/*.html