Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Buildkite #299

Merged
merged 19 commits into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .buildkite/brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
brew "pkg-config"
brew "libxml2"
brew "imagemagick@6"
brew "git-lfs"
61 changes: 61 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Nodes with values to reuse in the pipeline.
common_params:
plugins: &common_plugins
- &bash_cache automattic/bash-cache#v1.3.2: ~
env: &common_env
IMAGE_ID: xcode-12.5.1

steps:
#################
# Build and Test
#################
- label: "🧪 Build and Test"
key: "test"
command: |
echo "--- :beer: Installing Dependencies"
brew bundle --file .buildkite/brewfile

echo "--- :rubygems: Setting up Gems"
install_gems

echo "--- :hammer: Build DrawText"
bundle exec rake compile

echo "--- :git: Setting up git-lfs"
git-lfs install

echo "--- :rspec: Run Rspec"
bundle exec rspec --profile 10 --format progress
env: *common_env
plugins: *common_plugins
agents:
queue: "mac"
#################
# Lint
#################
- label: "🧹 Lint"
command: |
echo "--- :rubygems: Setting up Gems"
install_gems

echo "--- :rubocop: Run Rubocop"
bundle exec rubocop
mokagio marked this conversation as resolved.
Show resolved Hide resolved
env: *common_env
plugins: *common_plugins
agents:
queue: "mac"

#################
# Danger
#################
- label: "⛔️ Danger"
command: |
echo "--- :rubygems: Setting up Gems"
install_gems

echo "--- :rubocop: Run Danger"
bundle exec danger
env: *common_env
plugins: *common_plugins
agents:
queue: "mac"
2 changes: 1 addition & 1 deletion .bundle/config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
BUNDLE_PATH: "vendor/bundle"
BUNDLE_SPECIFIC_PLATFORM: "false"
BUNDLE_WITH: "test"
3 changes: 0 additions & 3 deletions .circleci/.brewfile

This file was deleted.

2 changes: 0 additions & 2 deletions .circleci/cache-version

This file was deleted.

100 changes: 0 additions & 100 deletions .circleci/config.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _None_

### Internal Changes

_None_
- Adopt Buildkite
AliSoftware marked this conversation as resolved.
Show resolved Hide resolved

## 1.4.0

Expand Down
9 changes: 3 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ gemspec
gem 'danger', '~> 8.0'
gem 'danger-rubocop', '~> 0.6'

group :test do
gem 'codecov', require: false
gem 'rspec'
gem 'webmock', require: false, group: :test
gem 'yard'
end
gem 'codecov', require: false
gem 'webmock', require: false
gem 'yard'
Comment on lines -8 to +10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. Just curious, though, did you decide to remove the test group because:

  • Everyone running bundle install on this project is expected to run the tests; and
  • Consumer of the gem get the dependencies via what's specified in the .gemspec, so there's no need to add groups here because, if we don't add these to the .gemspec they won't be part of the gem dependency resolution chain

?

Copy link
Contributor

@AliSoftware AliSoftware Oct 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, exactly. As Jeremy said in the description of this PR:

Removes the test group from the Gemfile – if you're using that instead of the gemspec you are sort of by definition out to do development work on the toolkit, so you should have all the tooling present.


plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
6 changes: 4 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ DEPENDENCIES
fastlane-plugin-wpmreleasetoolkit!
pry (~> 0.12.2)
rmagick (~> 4.1)
rspec
rspec (~> 3.8)
rspec-expectations (~> 3.8)
rspec-mocks (~> 3.8)
rspec_junit_formatter (~> 0.4.1)
rubocop (~> 1.0)
rubocop-require_tools (~> 0.1.2)
Expand All @@ -424,4 +426,4 @@ DEPENDENCIES
yard

BUNDLED WITH
2.2.25
2.2.27
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.description

def self.details
'This action extracts the version of the library which is imported by the client app' \
'and downloads the request file from the relevant GitHub release'
'and downloads the request file from the relevant GitHub release'
end

def self.available_options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def self.description

def self.details
'This actions checks the current status of the translations on GlotPress ' \
'and raises an error if it\'s below the provided threshold'
'and raises an error if it\'s below the provided threshold'
end

def self.available_options
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require 'simplecov'
require 'codecov'
require 'webmock/rspec'

# SimpleCov.minimum_coverage 95
SimpleCov.start
Expand Down