Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Miscellaneous project updates (#487)
Browse files Browse the repository at this point in the history
* Set local and kitchen-tests Ruby to 3.1

kitchen/rake_tasks raises a `NameError: undefined method `=~'` error on
Ruby 3.2

* Add Ruby 3.1, 3.2 to rspec-tests

* Use Ruby 3.2 in release

* Use bundler 2.4 in kitchen-tests, rspec-tests

* Fix reference to rake test:rspec

* Set local terraform to 1.3.7

* Clean empty space

* Set local terragrunt to 0.36.0
  • Loading branch information
aaron-lane authored Jan 20, 2023
1 parent 13fb8bb commit ca1fabe
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 20 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/kitchen-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
defaults:
run:
shell: bash

jobs:
kitchen-tests:
strategy:
Expand All @@ -28,17 +28,17 @@ jobs:
terraform-version: '0.14.11'
- operating-system: windows
terraform-version: '0.13.7'

runs-on: ${{ matrix.operating-system }}-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
# bundler 2.2 fails to install the gems
bundler: '2.1.4'
# kitchen/rake_tasks raises a `NameError: undefined method `=~'` error on Ruby 3.2
ruby-version: '3.1'
bundler: '2.4'
bundler-cache: true
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Ruby 2.6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6 # uses the latest release matching that version (e.g., 2.6.6)
ruby-version: '3.2'
bundler-cache: false # when true, runs 'bundle install' and caches installed gems automatically

- name: Build
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/rspec-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- '2.6'
- '2.7'
- '3.0'
- '3.1'
- '3.2'
runs-on: ubuntu-latest
env:
CC_TEST_REPORTER_ID: 7574433e1beed630cb9a171c688bb9e010d5028f00f7218d6e845fe138c65168
Expand All @@ -29,14 +31,13 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
# bundler 2.2 fails to install the gems
bundler: '2.1.4'
bundler: '2.4'
bundler-cache: true
- name: Run RSpec Tests
if: ${{ matrix.ruby-version != '3.0' }}
if: ${{ matrix.ruby-version != '3.2' }}
run: bundle exec rake test:rspec
- name: Run RSpec Tests with Code Coverage
if: ${{ matrix.ruby-version == '3.0' }}
if: ${{ matrix.ruby-version == '3.2' }}
uses: paambaati/codeclimate-action@v3.2.0
with:
coverageCommand: bundle exec rake test:rspec
coverageCommand: bundle exec rake test:rspec
4 changes: 4 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# kitchen/rake_tasks raises a `NameError: undefined method `=~'` error on Ruby 3.2
ruby 3.1.3
terraform 1.3.7
terragrunt 0.36.0
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The following command will execute the unit tests.
> Executing unit tests with RSpec
```sh
bundle exec rake test:spec
bundle exec rake test:rspec
```

[.rspec](.rspec) contains command line options which will be
Expand Down Expand Up @@ -135,17 +135,17 @@ analysis locally.
[GitHub Actions][github-actions] are used to provide continuous integration and
continuous deployment functionality for the Ruby gem.

[rspec-tests.yml](.github/workflows/rspec-tests.yml) defines unit tests
that will be executed for each commit to the master branch and each
[rspec-tests.yml](.github/workflows/rspec-tests.yml) defines unit tests
that will be executed for each commit to the master branch and each
commit to a branch with an open pull request.

[kitchen-tests.yml](.github/workflows/kitchen-tests.yml) defines
integration tests that will be executed for each commit to the master
[kitchen-tests.yml](.github/workflows/kitchen-tests.yml) defines
integration tests that will be executed for each commit to the master
branch and each commit to a branch with an open pull request.

[release.yml](.github/workflows/release.yml) contains the job
configuration to deploy the Ruby gem. If a [tag][git-tag] starting with
v is pushed to the master branch, then the job will attempt to build
[release.yml](.github/workflows/release.yml) contains the job
configuration to deploy the Ruby gem. If a [tag][git-tag] starting with
v is pushed to the master branch, then the job will attempt to build
the Ruby gem and deploy it to [RubyGems][ruby-gems].

#### Releasing
Expand Down

0 comments on commit ca1fabe

Please sign in to comment.