-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor + Test + Support preview releases
I've resisted really touching the compilation script because it had no tests. This was tolerable when we ran scripts locally and adjustments could be made on the fly. Now that we're automating them, I wanted to have more confidence in the script. To do that I iteratively extracted, tested, and then refactored code. In the process I got rid of most branching logic for features we don't support on GitHub actions today. If we need them in the future we have a git history. The unit tests are fast, but not terribly comprehensive. We could continue down this path of testing and refactoring if we choose, but this was a good enough stoping point for my needs. The only new behavior added is fixing these bugs that are all centered around preview/rc releases: - #28 - #29 - #30 While I'm at it I also added a linter (standard).
- Loading branch information
Showing
21 changed files
with
763 additions
and
352 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
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,59 @@ | ||
name: CI | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.1 | ||
bundler-cache: true | ||
- name: Linting | ||
run: bundle exec standardrb | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.1' | ||
bundler-cache: true | ||
- name: test | ||
run: bundle exec rspec spec | ||
|
||
integration_test: | ||
runs-on: pub-hk-ubuntu-22.04-xlarge | ||
env: | ||
STACK: "heroku-22" | ||
TEST_VERSION: "3.1.4" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 | ||
with: | ||
ruby-version: '3.1' | ||
- name: Install dependencies | ||
run: bundle install | ||
- name: Output CHANGELOG | ||
run: bundle exec rake "changelog[$TEST_VERSION]" | ||
- name: Build Docker image | ||
run: bundle exec rake "generate_image[$STACK]" | ||
- name: Generate Ruby Dockerfile | ||
run: bundle exec rake "new[$TEST_VERSION,$STACK]" | ||
- name: Build and package Ruby runtime | ||
run: bash "rubies/$STACK/ruby-$TEST_VERSION.sh" | ||
- name: Verify ruby executable and output rubygems version | ||
run: bundle exec rake "rubygems_version[$TEST_VERSION,$STACK]" | ||
|
||
|
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 @@ | ||
ruby_version: 3.1 | ||
ignore: | ||
- 'builds/**/*' | ||
- 'rubies/**/*' | ||
- 'test/fixtures/**/*' |
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 |
---|---|---|
|
@@ -5,3 +5,5 @@ gem "aws-sdk" | |
gem "heroku_hatchet" | ||
gem "webrick" | ||
gem "nokogiri" | ||
gem "rspec" | ||
gem "standard" |
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
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
Oops, something went wrong.