-
Notifications
You must be signed in to change notification settings - Fork 34
110 lines (96 loc) · 3.67 KB
/
cucumber_tests.yml
File metadata and controls
110 lines (96 loc) · 3.67 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Integration tests
env:
TZ: Europe/London
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID || '9c624e5d90c5b319d678e06d66c7671f1661fda826436d475f9679b54be63e26' }}
KNAPSACK_PRO_TEST_SUITE_TOKEN_CUCUMBER: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_CUCUMBER }}
KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true
KNAPSACK_PRO_LOG_LEVEL: info
SKIP_AUTOMATIC_GEM_INSTALLATION: true # Disable the bundle install in bin/setup
########
## Warning!
## CodeCov's config in `codecov.yml` is expecting an exact number of builds to complete before it will run.
## See the config value with key `after_n_builds` in that file.
## If the number of build steps changes, it is important to update the count there to match.
########
on:
push:
branches:
- develop
- master
pull_request:
types:
# defaults
- opened
- synchronize
- reopened
# custom
- ready_for_review # required for Github-created PRs
jobs:
cucumber_tests:
name: Cucumber tests
runs-on: ubuntu-latest
env:
RAILS_ENV: cucumber
BUNDLE_WITHOUT: "deployment profile development test"
services:
mysql:
# Use the Mysql docker image https://hub.docker.com/_/mysql
image: mysql:8.0
ports:
- 3306 # Default port mappings
# Monitor the health of the container to mesaure when it is ready
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
MYSQL_ROOT_PASSWORD: "" # Set root PW to nothing
MYSQL_ALLOW_EMPTY_PASSWORD: yes
# Sets up the matrix for knapsack builds
strategy:
matrix:
ci_node_total: [2]
ci_node_index: [0, 1]
steps:
- name: Checkout Repository
uses: sanger/.github/.github/actions/setup/checkout@master
- name: Setup Ruby
uses: sanger/.github/.github/actions/setup/ruby@master
- name: Setup Node
uses: sanger/.github/.github/actions/setup/node@master
- name: Fix apt mirrors + networking
run: |
sudo sed -i 's|http://azure.archive.ubuntu.com|http://archive.ubuntu.com|g' /etc/apt/apt-mirrors.txt
echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
echo 'Acquire::Retries "1";' | sudo tee /etc/apt/apt.conf.d/80-retries
- name: Setup stable Chrome
uses: sanger/.github/.github/actions/tests/setup-chrome@master
with:
chrome-version: 128
install-chromedriver: true
install-dependencies: true
- name: Setup environment
env:
DBPORT: ${{ job.services.mysql.ports[3306] }}
run: |
bin/setup --skip-server
bundle exec rake assets:precompile
# Actually run our tests
- name: Run Cucumber tests
env:
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
DBPORT: ${{ job.services.mysql.ports[3306] }}
run: bin/knapsack_pro_cucumber
- name: Upload capybara artifacts
uses: sanger/.github/.github/actions/tests/upload-artifact@master
if: ${{ failure() }}
with:
name: capybara-${{ github.job }}-${{ matrix.ci_node_index }}
path: tmp/capybara/
retention-days: 5
- name: Upload coverage reports to Codecov
uses: sanger/.github/.github/actions/tests/codecov@master
with:
name: ${{ github.run_id }}_${{ github.job }}_${{ matrix.ci_node_index }}_${{ github.event_name }}
token: ${{ secrets.CODECOV_TOKEN }}
flags: ruby
disable-search: true
files: ${{ github.workspace }}/lcov.info