-
Notifications
You must be signed in to change notification settings - Fork 194
60 lines (49 loc) · 1.57 KB
/
cucumber.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
53
54
55
56
57
58
59
60
name: Run Cucumber
on: workflow_call
jobs:
feature-test-matrix:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node_rake_task: ["cucumber:ok"]
steps:
- name: Setup MySQL
id: setup-mysql
uses: alphagov/govuk-infrastructure/.github/actions/setup-mysql@main
- name: Setup Redis
uses: alphagov/govuk-infrastructure/.github/actions/setup-redis@main
- name: Checkout repository
uses: actions/checkout@v4
with:
show-progress: false
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Node
uses: alphagov/govuk-infrastructure/.github/actions/setup-node@main
- name: Precompile assets
uses: alphagov/govuk-infrastructure/.github/actions/precompile-rails-assets@main
- name: Initialize database
env:
RAILS_ENV: test
TEST_DATABASE_URL: ${{ steps.setup-mysql.outputs.db-url }}
run: bundle exec rails db:setup
- name: Run cucumber
env:
RAILS_ENV: test
TEST_DATABASE_URL: ${{ steps.setup-mysql.outputs.db-url }}
run: bundle exec rake ${{ matrix.node_rake_task }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: capybara-screenshots
path: tmp/capybara/capybara-*.png
run-cucumber:
name: Run Cucumber
needs: feature-test-matrix
runs-on: ubuntu-latest
steps:
- run: echo "All feature tests have passed 🚀"