Skip to content

Commit 0ac65db

Browse files
author
Daniel
authored
Add GitHub actions (airsidemobile#200)
* Create pull_request.yml * Run tests and danger * Trz parallelization * Try to fix syntax * Fix jobs * Remove other jobs * Fix yaml * Update config * Chache gems * Restore gem cache for testing * Don't reinstall gems on cache hit * Cache brew installs * Add bre lockfile * Remove unneeded ids * REname brew cache * Don't install brew dependencies * Set bundler cache path in danger job * Add danger API token * List cellar * Fix syntax error * Remove logging * Try danger action * REmove danger * Add sonarcloud config file * Do sonarcloud analysis * Revert "Do sonarcloud analysis" This reverts commit 7b01ff4. * Run danger action * Fix syntax * Change danger file extension and remove gem * Run danger using SPM * Run danger on macos * Use danger ruby again * Add token * Fetch all history * Remove travis * Add trailing whitespace * Remove danger test * REmove linting violation * Undo changes * Update fastlane
1 parent 764ea3b commit 0ac65db

File tree

5 files changed

+107
-50
lines changed

5 files changed

+107
-50
lines changed

.github/workflows/pull_request.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
install_dependendies:
10+
name: Install Dependencies
11+
runs-on: macOS-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/cache@v1
15+
id: gems-cache
16+
with:
17+
path: cache/bundle
18+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
19+
- name: Bundler
20+
if: steps.gems-cache.outputs.cache-hit != 'true'
21+
run: |
22+
bundle config path cache/bundle
23+
bundle install --jobs 4 --retry 3
24+
25+
test:
26+
name: Unit Tests
27+
runs-on: macOS-latest
28+
needs: install_dependendies
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: actions/cache@v1
32+
with:
33+
path: cache/bundle
34+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
35+
- name: Test
36+
run: |
37+
bundle config path cache/bundle
38+
bundle exec fastlane test
39+
40+
danger:
41+
name: Danger
42+
runs-on: macOS-latest
43+
needs: install_dependendies
44+
steps:
45+
- uses: actions/checkout@v2
46+
with:
47+
fetch-depth: 0
48+
- uses: actions/cache@v1
49+
with:
50+
path: cache/bundle
51+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
52+
- name: Danger
53+
env:
54+
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN}}
55+
run: |
56+
bundle config path cache/bundle
57+
bundle exec danger

.sonarcloud.properties

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
sonar.sources=JOSESwift/Sources
2+
sonar.tests=Tests
3+
4+
sonar.sourceEncoding=UTF-8
5+
6+
sonar.swift.excludedPathsFromCoverage=**/*Tests*/**
7+
sonar.swift.file.suffixes=.swift
8+
9+
sonar.workspace=JOSESwift.xcworkspace
10+
sonar.scheme=JOSESwift

.travis.yml

-15
This file was deleted.

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source 'https://rubygems.org'
22

33
gem 'cocoapods'
4-
gem 'fastlane', '>= 2.127.2'
4+
gem 'fastlane'
55
gem 'xcpretty'
66
gem 'danger'
7-
gem 'danger-swiftlint', '>=0.20.0'
7+
gem 'danger-swiftlint'

Gemfile.lock

+38-33
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ GEM
5656
concurrent-ruby (1.1.5)
5757
cork (0.3.0)
5858
colored2 (~> 3.1)
59-
danger (6.0.9)
59+
danger (6.2.0)
6060
claide (~> 1.0)
6161
claide-plugins (>= 0.9.2)
6262
colored2 (~> 3.1)
@@ -69,7 +69,7 @@ GEM
6969
no_proxy_fix
7070
octokit (~> 4.7)
7171
terminal-table (~> 1)
72-
danger-swiftlint (0.22.0)
72+
danger-swiftlint (0.24.0)
7373
danger
7474
rake (> 10)
7575
thor (~> 0.19)
@@ -81,8 +81,8 @@ GEM
8181
dotenv (2.7.5)
8282
emoji_regex (1.0.1)
8383
escape (0.0.4)
84-
excon (0.71.1)
85-
faraday (0.17.1)
84+
excon (0.72.0)
85+
faraday (0.17.3)
8686
multipart-post (>= 1.2, < 3)
8787
faraday-cookie_jar (0.0.6)
8888
faraday (>= 0.7.4)
@@ -92,7 +92,7 @@ GEM
9292
faraday_middleware (0.13.1)
9393
faraday (>= 0.7.4, < 1.0)
9494
fastimage (2.1.7)
95-
fastlane (2.138.0)
95+
fastlane (2.141.0)
9696
CFPropertyList (>= 2.3, < 4.0.0)
9797
addressable (>= 2.3, < 3.0.0)
9898
babosa (>= 1.0.2, < 2.0.0)
@@ -107,7 +107,7 @@ GEM
107107
faraday_middleware (~> 0.13.1)
108108
fastimage (>= 2.1.0, < 3.0.0)
109109
gh_inspector (>= 1.1.2, < 2.0.0)
110-
google-api-client (>= 0.21.2, < 0.24.0)
110+
google-api-client (>= 0.29.2, < 0.37.0)
111111
google-cloud-storage (>= 1.15.0, < 2.0.0)
112112
highline (>= 1.7.2, < 2.0.0)
113113
json (< 3.0.0)
@@ -132,31 +132,36 @@ GEM
132132
fourflusher (2.3.1)
133133
fuzzy_match (2.0.4)
134134
gh_inspector (1.1.3)
135-
git (1.5.0)
136-
google-api-client (0.23.9)
135+
git (1.6.0)
136+
rchardet (~> 1.8)
137+
google-api-client (0.36.4)
137138
addressable (~> 2.5, >= 2.5.1)
138-
googleauth (>= 0.5, < 0.7.0)
139+
googleauth (~> 0.9)
139140
httpclient (>= 2.8.1, < 3.0)
140-
mime-types (~> 3.0)
141+
mini_mime (~> 1.0)
141142
representable (~> 3.0)
142143
retriable (>= 2.0, < 4.0)
143-
signet (~> 0.9)
144-
google-cloud-core (1.3.2)
144+
signet (~> 0.12)
145+
google-cloud-core (1.5.0)
145146
google-cloud-env (~> 1.0)
146-
google-cloud-env (1.2.1)
147+
google-cloud-errors (~> 1.0)
148+
google-cloud-env (1.3.0)
147149
faraday (~> 0.11)
148-
google-cloud-storage (1.16.0)
150+
google-cloud-errors (1.0.0)
151+
google-cloud-storage (1.25.1)
152+
addressable (~> 2.5)
149153
digest-crc (~> 0.4)
150-
google-api-client (~> 0.23)
154+
google-api-client (~> 0.33)
151155
google-cloud-core (~> 1.2)
152-
googleauth (>= 0.6.2, < 0.10.0)
153-
googleauth (0.6.7)
156+
googleauth (~> 0.9)
157+
mini_mime (~> 1.0)
158+
googleauth (0.10.0)
154159
faraday (~> 0.12)
155160
jwt (>= 1.4, < 3.0)
156161
memoist (~> 0.16)
157162
multi_json (~> 1.11)
158163
os (>= 0.9, < 2.0)
159-
signet (~> 0.7)
164+
signet (~> 0.12)
160165
highline (1.7.10)
161166
http-cookie (1.0.3)
162167
domain_name (~> 0.5)
@@ -169,10 +174,8 @@ GEM
169174
kramdown-parser-gfm (1.1.0)
170175
kramdown (~> 2.0)
171176
memoist (0.16.2)
172-
mime-types (3.3)
173-
mime-types-data (~> 3.2015)
174-
mime-types-data (3.2019.1009)
175-
mini_magick (4.9.5)
177+
mini_magick (4.10.1)
178+
mini_mime (1.0.2)
176179
minitest (5.11.3)
177180
molinillo (0.6.6)
178181
multi_json (1.14.1)
@@ -183,13 +186,15 @@ GEM
183186
naturally (2.2.0)
184187
netrc (0.11.0)
185188
no_proxy_fix (0.1.2)
186-
octokit (4.14.0)
189+
octokit (4.16.0)
190+
faraday (>= 0.9)
187191
sawyer (~> 0.8.0, >= 0.5.3)
188192
open4 (1.3.4)
189193
os (1.0.1)
190194
plist (3.5.0)
191195
public_suffix (2.0.5)
192-
rake (12.3.2)
196+
rake (13.0.1)
197+
rchardet (1.8.0)
193198
representable (3.0.4)
194199
declarative (< 0.1.0)
195200
declarative-option (< 0.2.0)
@@ -202,7 +207,7 @@ GEM
202207
addressable (>= 2.3.5)
203208
faraday (> 0.8, < 2.0)
204209
security (0.1.3)
205-
signet (0.11.0)
210+
signet (0.12.0)
206211
addressable (~> 2.3)
207212
faraday (~> 0.9)
208213
jwt (>= 1.5, < 3.0)
@@ -216,19 +221,19 @@ GEM
216221
unicode-display_width (~> 1.1, >= 1.1.1)
217222
thor (0.20.3)
218223
thread_safe (0.3.6)
219-
tty-cursor (0.7.0)
220-
tty-screen (0.7.0)
221-
tty-spinner (0.9.2)
224+
tty-cursor (0.7.1)
225+
tty-screen (0.7.1)
226+
tty-spinner (0.9.3)
222227
tty-cursor (~> 0.7)
223228
tzinfo (1.2.5)
224229
thread_safe (~> 0.1)
225230
uber (0.1.0)
226231
unf (0.1.4)
227232
unf_ext
228233
unf_ext (0.0.7.6)
229-
unicode-display_width (1.6.0)
234+
unicode-display_width (1.6.1)
230235
word_wrap (1.0.0)
231-
xcodeproj (1.14.0)
236+
xcodeproj (1.15.0)
232237
CFPropertyList (>= 2.3.3, < 4.0)
233238
atomos (~> 0.1.3)
234239
claide (>= 1.0.2, < 2.0)
@@ -245,9 +250,9 @@ PLATFORMS
245250
DEPENDENCIES
246251
cocoapods
247252
danger
248-
danger-swiftlint (>= 0.20.0)
249-
fastlane (>= 2.127.2)
253+
danger-swiftlint
254+
fastlane
250255
xcpretty
251256

252257
BUNDLED WITH
253-
2.0.2
258+
2.1.4

0 commit comments

Comments
 (0)