Skip to content

Commit 18df5ed

Browse files
Merge pull request #386 from splitio/AUT-1158-GHA-Migration
CI workflow added and Travis removed
2 parents 83084bb + 4622454 commit 18df5ed

4 files changed

Lines changed: 72 additions & 63 deletions

File tree

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
services:
13+
redis:
14+
image: redis
15+
ports:
16+
- 6379:6379
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set up Ruby
24+
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
25+
with:
26+
ruby-version: 2.4
27+
28+
- name: Install dependencies
29+
run: bundle install
30+
31+
- name: Run tests
32+
run: bundle exec rake
33+
34+
- name: SonarQube Scan (Push)
35+
if: github.event_name == 'push'
36+
uses: SonarSource/sonarcloud-github-action@v1.5
37+
env:
38+
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
39+
with:
40+
projectBaseDir: .
41+
args: >
42+
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
43+
-Dsonar.projectName=${{ github.event.repository.name }}
44+
-Dsonar.projectKey=${{ github.event.repository.name }}
45+
-Dsonar.ruby.coverage.reportPaths='coverage/.resultset.json'
46+
-Dsonar.c.file.suffixes=-
47+
-Dsonar.cpp.file.suffixes=-
48+
-Dsonar.objc.file.suffixes=-
49+
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
50+
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
51+
52+
- name: SonarQube Scan (Pull Request)
53+
if: github.event_name == 'pull_request'
54+
uses: SonarSource/sonarcloud-github-action@v1.5
55+
env:
56+
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
57+
with:
58+
projectBaseDir: .
59+
args: >
60+
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
61+
-Dsonar.projectName=${{ github.event.repository.name }}
62+
-Dsonar.projectKey=${{ github.event.repository.name }}
63+
-Dsonar.ruby.coverage.reportPaths='coverage/.resultset.json'
64+
-Dsonar.c.file.suffixes=-
65+
-Dsonar.cpp.file.suffixes=-
66+
-Dsonar.objc.file.suffixes=-
67+
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
68+
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
69+
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
70+
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
71+
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

sonar-scanner.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

splitclient-rb.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
3838

3939
spec.add_development_dependency 'allocation_stats'
4040
spec.add_development_dependency 'appraisal'
41-
spec.add_development_dependency 'bundler', '~> 1.11'
41+
spec.add_development_dependency 'bundler'
4242
spec.add_development_dependency 'pry'
4343
spec.add_development_dependency 'pry-nav'
4444
spec.add_development_dependency 'rake', '12.3.3'

0 commit comments

Comments
 (0)