Skip to content

Commit

Permalink
Add Fourier CLI (#2196)
Browse files Browse the repository at this point in the history
* Define backbone CLI

* Move it under backbone/lib

* Add pipeline

* Rename CLI to fourier

* Fix Ruby veresion

* Update CHANGELOG

* Add documentation

* Prettify test run output

* Test the tuist test command

* Adjust the pipeline to use fourier for running unit tests

* Update dependencies
  • Loading branch information
Pedro Pi帽era Buend铆a committed Dec 26, 2020
1 parent 0b1f8ec commit 80189ef
Show file tree
Hide file tree
Showing 26 changed files with 350 additions and 34 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/checks.yml
Expand Up @@ -7,6 +7,9 @@ on:
- main
pull_request:

env:
RUBY_VERSION: '2.7.2'

jobs:
swiftformat:
name: SwiftFormat with Xcode ${{ matrix.xcode }}
Expand All @@ -20,7 +23,7 @@ jobs:
run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode }}.app
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.x'
ruby-version: ${{ env.RUBY_VERSION }}
- name: Install Bundler 2.1.4
run: gem install bundler --version 2.1.4
- name: Install Bundler dependencies
Expand All @@ -39,7 +42,7 @@ jobs:
run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode }}.app
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.x'
ruby-version: ${{ env.RUBY_VERSION }}
- name: Install Bundler 2.1.4
run: gem install bundler --version 2.1.4
- name: Install Bundler dependencies
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/fourier.yml
@@ -0,0 +1,58 @@
name: Fourier

on:
push:
branches:
- main
pull_request:

env:
RUBY_VERSION: '2.7.2'

jobs:
tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
- name: Install Bundler 2.1.4
run: gem install bundler --version 2.1.4
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Unit tests
run: |
bundle exec rake test_fourier
rubocop:
name: Rubocop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
- name: Install Bundler 2.1.4
run: gem install bundler --version 2.1.4
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Rubocop
run: |
bundle exec rubocop
30 changes: 20 additions & 10 deletions .github/workflows/tuist.yml
Expand Up @@ -6,10 +6,13 @@ on:
- main
pull_request:

env:
RUBY_VERSION: '2.7.2'

jobs:
unit_tests:
name: Unit tests with Xcode ${{ matrix.xcode }}
runs-on: macOS-latest
runs-on: macos-latest
strategy:
matrix:
xcode: ['11.5', '12.3']
Expand All @@ -24,11 +27,22 @@ jobs:
key: ${{ runner.os }}-${{ matrix.xcode }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-${{ matrix.xcode }}-spm-
- uses: actions/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run tests
run: |
rm -rf .coverage
mkdir -p .coverage
swift test --enable-code-coverage
./bin/fourier test tuist unit
release_build:
name: Release build with Xcode ${{ matrix.xcode }}
runs-on: macOS-latest
Expand Down Expand Up @@ -89,9 +103,7 @@ jobs:
${{ runner.os }}-spm-
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.x'
- name: Install Bundler 2.1.4
run: gem install bundler --version 2.1.4
ruby-version: ${{ env.RUBY_VERSION }}
- uses: actions/cache@v2
with:
path: vendor/bundle
Expand All @@ -117,9 +129,7 @@ jobs:
run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode }}.app
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.x'
- name: Install Bundler 2.1.4
run: gem install bundler --version 2.1.4
ruby-version: ${{ env.RUBY_VERSION }}
- uses: actions/cache@v2
with:
path: vendor/bundle
Expand Down
8 changes: 6 additions & 2 deletions .rubocop.yml
@@ -1,6 +1,10 @@
inherit_from:
- http://shopify.github.io/ruby-style-guide/rubocop.yml

require:
- rubocop-minitest
- rubocop-rake

Style/ClassAndModuleChildren:
Enabled: false
Style/RedundantBegin:
Expand All @@ -14,12 +18,12 @@ AllCops:
- features/**/*
- fixtures/**/*
- .build/**/*
- .circleci/**/*
- .vscode/**/*
- assets/**/*
- build/**/*
- Carthage/**/*
- Sources/**/*
- Tests/**/*
- .github/**/*
- website/node_modules/**/*
- website/**/*
- next/**/*
2 changes: 1 addition & 1 deletion .ruby-version
@@ -1 +1 @@
2.6.5
2.7.2
2 changes: 2 additions & 0 deletions .shadowenv.d/.gitignore
@@ -0,0 +1,2 @@
/.*
!/.gitignore
1 change: 1 addition & 0 deletions .shadowenv.d/fourier.lisp
@@ -0,0 +1 @@
(env/prepend-to-pathlist "PATH" "./bin")
5 changes: 4 additions & 1 deletion .vscode/extensions.json
Expand Up @@ -2,6 +2,9 @@
"recommendations": [
"blodwynn.featurehighlight",
"silvenon.mdx",
"bradlc.vscode-tailwindcss"
"bradlc.vscode-tailwindcss",
"rebornix.ruby",
"misogi.ruby-rubocop",
"shopify.vscode-shadowenv"
]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,10 @@ Please, check out guidelines: https://keepachangelog.com/en/1.0.0/

- Fix import of multiple signing certificates [#2112](https://github.com/tuist/tuist/pull/2112) by [@rist](https://github.com/rist).

### Added

- Fourier CLI tool to automate development tasks [#2196](https://github.com/tuist/tuist/pull/2196) by @pepibumur](https://github.com/pepibumur).

## 1.29.0 - Tutu

### Fixed
Expand Down
21 changes: 18 additions & 3 deletions Gemfile
Expand Up @@ -4,10 +4,7 @@ source "https://rubygems.org"

gem "cucumber", "~> 5.2"
gem "rake", "~> 13.0"
gem "byebug", "~> 11.1"
gem "minitest", "~> 5.14"
gem "simctl", "~> 1.6"
gem "rubocop", "~> 1.6.1"
gem "encrypted-environment", "~> 0.2.0"
gem "google-cloud-storage", "~> 1.29"
gem "colorize", "~> 0.8.1"
Expand All @@ -16,3 +13,21 @@ gem "xcodeproj", "~> 1.19"
gem "highline", "~> 2.0"
gem "rubyzip", "~> 2.3.0"
gem "ruby-macho", "~> 1.4"
gem "cli-ui", "~> 1.4"
gem "thor", "~> 1.0"

group :test do
gem "mocha", "~> 1.12"
gem 'minitest'
gem 'minitest-reporters'
end

group :development do
gem "rubocop", "~> 1.6.1"
gem 'rubocop-minitest', require: false
gem 'rubocop-rake', require: false
end

group :development, :test do
gem "byebug", "~> 11.1"
end
46 changes: 32 additions & 14 deletions Gemfile.lock
@@ -1,22 +1,24 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.2)
CFPropertyList (3.0.3)
activesupport (5.2.4.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.4)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
ansi (1.5.0)
ast (2.4.1)
atomos (0.1.3)
builder (3.2.4)
byebug (11.1.3)
claide (1.0.3)
cli-ui (1.4.0)
cocoapods (1.10.0)
addressable (~> 2.6)
claide (>= 1.0.2, < 2.0)
Expand Down Expand Up @@ -73,15 +75,15 @@ GEM
cucumber-gherkin (~> 15.0, >= 15.0.2)
cucumber-messages (~> 13.0, >= 13.0.1)
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
cucumber-create-meta (2.0.2)
cucumber-messages (~> 13.0, >= 13.0.1)
cucumber-create-meta (2.0.4)
cucumber-messages (~> 13.1, >= 13.1.0)
sys-uname (~> 1.2, >= 1.2.1)
cucumber-cucumber-expressions (10.3.0)
cucumber-gherkin (15.0.2)
cucumber-messages (~> 13.0, >= 13.0.1)
cucumber-html-formatter (9.0.0)
cucumber-messages (~> 13.0, >= 13.0.1)
cucumber-messages (13.1.0)
cucumber-messages (13.2.1)
protobuf-cucumber (~> 3.10, >= 3.10.8)
cucumber-tag-expressions (2.0.4)
cucumber-wire (4.0.1)
Expand All @@ -99,10 +101,10 @@ GEM
escape (0.0.4)
ethon (0.12.0)
ffi (>= 1.3.0)
faraday (1.1.0)
faraday (1.2.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
ffi (1.13.1)
ffi (1.14.2)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
Expand Down Expand Up @@ -139,12 +141,18 @@ GEM
httpclient (2.8.3)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
json (2.3.1)
json (2.5.1)
jwt (2.2.2)
memoist (0.16.2)
middleware (0.1.0)
mini_mime (1.0.2)
minitest (5.14.2)
minitest-reporters (1.4.2)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
mocha (1.12.0)
molinillo (0.6.6)
multi_json (1.15.0)
multi_test (0.1.2)
Expand All @@ -155,7 +163,7 @@ GEM
netrc (0.11.0)
os (1.1.1)
parallel (1.20.1)
parser (2.7.2.0)
parser (3.0.0.0)
ast (~> 2.4.1)
protobuf-cucumber (3.10.8)
activesupport (>= 3.2)
Expand All @@ -165,7 +173,7 @@ GEM
public_suffix (4.0.6)
rainbow (3.0.0)
rake (13.0.3)
regexp_parser (2.0.0)
regexp_parser (2.0.2)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
Expand All @@ -183,6 +191,10 @@ GEM
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.3.0)
parser (>= 2.7.1.5)
rubocop-minitest (0.10.1)
rubocop (>= 0.87)
rubocop-rake (0.5.1)
rubocop
ruby-macho (1.4.0)
ruby-progressbar (1.10.1)
ruby2_keywords (0.0.2)
Expand All @@ -195,13 +207,13 @@ GEM
simctl (1.6.8)
CFPropertyList
naturally
sys-uname (1.2.1)
ffi (>= 1.0.0)
sys-uname (1.2.2)
ffi (~> 1.1)
thor (1.0.1)
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.7)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uber (0.1.0)
unicode-display_width (1.7.0)
Expand All @@ -217,18 +229,24 @@ PLATFORMS

DEPENDENCIES
byebug (~> 11.1)
cli-ui (~> 1.4)
cocoapods (~> 1.10)
colorize (~> 0.8.1)
cucumber (~> 5.2)
encrypted-environment (~> 0.2.0)
google-cloud-storage (~> 1.29)
highline (~> 2.0)
minitest (~> 5.14)
minitest
minitest-reporters
mocha (~> 1.12)
rake (~> 13.0)
rubocop (~> 1.6.1)
rubocop-minitest
rubocop-rake
ruby-macho (~> 1.4)
rubyzip (~> 2.3.0)
simctl (~> 1.6)
thor (~> 1.0)
xcodeproj (~> 1.19)

BUNDLED WITH
Expand Down

0 comments on commit 80189ef

Please sign in to comment.