Skip to content

Commit

Permalink
Added rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Bates committed Apr 22, 2024
1 parent e40a185 commit 0efbeda
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1

- name: Install Gems
run: bundle install

- name: Rubocop
run: bundle exec rubocop

- name: Unit tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
run: |
bundle install
bundle exec fastlane unit
3 changes: 2 additions & 1 deletion Fastlane/Configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require 'yaml'

# Conficuration class to interface with .build.yml
class Configuration
def initialize(lane_name, yaml)
@lane_name = lane_name
Expand Down Expand Up @@ -37,6 +38,6 @@ def setting(prefix, key)
end

def lane
@lane || lane_name.split(' ').last
@lane ||= lane_name.split(' ').last
end
end
4 changes: 3 additions & 1 deletion Fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# frozen_string_literal: true

require_relative 'Configuration'
require_relative 'configuration'

default_platform :ios

# rubocop:disable Metrics/BlockLength
platform :ios do
desc 'Runs all the tests'
lane :unit do
Expand Down Expand Up @@ -53,3 +54,4 @@ def configuration
'.build.yml'
)
end
# rubocop:enable Metrics/BlockLength

0 comments on commit 0efbeda

Please sign in to comment.