-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (52 loc) · 1.37 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: CI
on:
workflow_call:
secrets:
MDS_USERNAME:
required: true
MDS_PASSWORD:
required: true
CC_TEST_REPORTER_ID:
required: true
jobs:
test:
runs-on: ubuntu-latest
services:
memcached:
image: memcached:1.4.31
ports:
- 11211/udp
env:
MEMCACHE_SERVERS: "localhost:11211"
MDS_USERNAME: ${{ secrets.MDS_USERNAME }}
MDS_PASSWORD: ${{ secrets.MDS_PASSWORD }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby 2.6
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6.9'
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install
env:
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: (Lint and) Test
env:
MEMCACHE_SERVERS: "localhost:11211"
run: |
# bundle exec rubocop
bundle exec rspec
echo $?
- name: Publish code coverage
uses: paambaati/codeclimate-action@v3.1.1
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}