-
Notifications
You must be signed in to change notification settings - Fork 6
67 lines (58 loc) · 2.01 KB
/
ruby_ci.yml
File metadata and controls
67 lines (58 loc) · 2.01 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
name: Ruby Lint and Test
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-latest
env:
TZ: Europe/London
#DISPLAY: ':99.0'
# Services
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idservices
services:
mysql:
# Use the Mysql docker image https://hub.docker.com/_/mysql
image: mysql:8.0
ports:
- 3306: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
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 stable Chrome
uses: sanger/.github/.github/actions/tests/setup-chrome@master
with:
chrome-version: 128
install-chromedriver: true
install-dependencies: true
- name: Additional setup
run: bin/setup
- name: Run rspec
run: bundle exec rspec
- name: Upload coverage reports to Codecov
uses: sanger/.github/.github/actions/tests/codecov@master
with:
name: ${{ github.run_id }}_${{ github.job }}_${{ github.event_name }}
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ github.event_name }}
disable-search: true
files: ${{ github.workspace }}/lcov.info
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache:
true # Runs bundle install and caches gems. See the ruby_test.yml
# example if you need more control over bundler.
- name: Lint
run: bundle exec rubocop