-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from cloudkats/feat/initial-plugin-setup
feat: initial plugin setup
- Loading branch information
Showing
16 changed files
with
568 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Ruby CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-ruby/ for more details | ||
# | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
# specify the version you desire here | ||
- image: circleci/ruby:2.5 | ||
|
||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "Gemfile" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: | ||
name: install dependencies | ||
command: bundle check || bundle install --jobs=4 --retry=3 --path vendor/bundle | ||
|
||
- save_cache: | ||
paths: | ||
- ./vendor | ||
key: v1-dependencies-{{ checksum "Gemfile" }} | ||
|
||
# run tests! | ||
- run: | ||
name: run tests | ||
command: bundle exec rake | ||
|
||
# collect reports | ||
- store_test_results: | ||
path: ~/repo/test-results | ||
- store_artifacts: | ||
path: ~/repo/test-results | ||
destination: test-results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile') }} | ||
restore-keys: | | ||
${{ runner.os }}-gem- | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.5 | ||
- name: Install dependencies | ||
run: bundle check || bundle install --jobs=4 --retry=3 --path vendor/bundle | ||
- name: Run tests | ||
run: bundle exec rake | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test-results | ||
path: test-results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--require spec_helper | ||
--color | ||
--format d | ||
--format RspecJunitFormatter | ||
--out test-results/rspec/rspec.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# os: osx # enable this if you need macOS support | ||
language: ruby | ||
rvm: | ||
- 2.2.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2021 ivan kat <cloudkats@gmail.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# saucelabs plugin | ||
|
||
[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-saucelabs) | ||
|
||
## Getting Started | ||
|
||
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-saucelabs`, add it to your project by running: | ||
|
||
```bash | ||
fastlane add_plugin saucelabs | ||
``` | ||
|
||
## About saucelabs | ||
|
||
Sauce Labs android & ios configuraiton | ||
|
||
**Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here. | ||
|
||
## Example | ||
|
||
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`. | ||
|
||
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary) | ||
|
||
## Run tests for this plugin | ||
|
||
To run both the tests, and code style validation, run | ||
|
||
``` | ||
rake | ||
``` | ||
|
||
To automatically fix many of the styling issues, use | ||
``` | ||
rubocop -a | ||
``` | ||
|
||
## Issues and Feedback | ||
|
||
For any other issues and feedback about this plugin, please submit it to this repository. | ||
|
||
## Troubleshooting | ||
|
||
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide. | ||
|
||
## Using _fastlane_ Plugins | ||
|
||
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/). | ||
|
||
## About _fastlane_ | ||
|
||
_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools). | ||
|
||
## Resources | ||
|
||
- [SauceLabs Status page](https://status.saucelabs.com/) | ||
- [SauceLabs API](https://docs.saucelabs.com/dev/api/index.html) | ||
|
||
## TODO | ||
|
||
- [ ] Support folders | ||
- [ ] Configure uploaded version | ||
- [X] Support mulitple regions to upload | ||
- [ ] Retry logic | ||
- [ ] Timeout logic | ||
- [X] Update description | ||
- [ ] Test key functionality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'bundler/gem_tasks' | ||
|
||
require 'rspec/core/rake_task' | ||
RSpec::Core::RakeTask.new | ||
|
||
require 'rubocop/rake_task' | ||
RuboCop::RakeTask.new(:rubocop) | ||
|
||
task(default: [:spec, :rubocop]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
lib = File.expand_path("lib", __dir__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'fastlane/plugin/saucelabs/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'fastlane-plugin-saucelabs' | ||
spec.version = Fastlane::Saucelabs::VERSION | ||
spec.author = 'ivan kat' | ||
spec.email = 'cloudkats@gmail.com' | ||
|
||
spec.summary = 'Sauce Labs android & ios configuraiton' | ||
# spec.homepage = "https://github.com/<GITHUB_USERNAME>/fastlane-plugin-saucelabs" | ||
spec.license = "MIT" | ||
|
||
spec.files = Dir["lib/**/*"] + %w(README.md LICENSE) | ||
spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) | ||
spec.require_paths = ['lib'] | ||
|
||
spec.required_ruby_version = '>= 2.5' | ||
|
||
# Don't add a dependency to fastlane or fastlane_re | ||
# since this would cause a circular dependency | ||
|
||
# spec.add_dependency 'your-dependency', '~> 1.0.0' | ||
|
||
spec.add_development_dependency('bundler') | ||
spec.add_development_dependency('fastlane', '>= 2.194.0') | ||
spec.add_development_dependency('pry') | ||
spec.add_development_dependency('rake') | ||
spec.add_development_dependency('rspec') | ||
spec.add_development_dependency('rspec_junit_formatter') | ||
spec.add_development_dependency('rubocop', '1.12.1') | ||
spec.add_development_dependency('rubocop-performance') | ||
spec.add_development_dependency('rubocop-require_tools') | ||
spec.add_development_dependency('simplecov') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
lane :test do | ||
saucelabs_upload | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Autogenerated by fastlane |
Oops, something went wrong.