Skip to content

Commit

Permalink
Remove Ruby 2.7 testing
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Webb <dan.webb@damacus.io>
  • Loading branch information
damacus committed Nov 27, 2023
1 parent ae0723b commit d3b15ca
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 114 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: 'Test'

'on':
pull_request:

jobs:
lint-unit:
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@v0.1.2
9 changes: 0 additions & 9 deletions .github/workflows/linters.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3.7.13
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: ruby
Expand Down
93 changes: 13 additions & 80 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
---
name: Smoke

'on':
"on":
pull_request:

permissions:
contents: read

jobs:
linux:
linux-dokken:
name: Linux 'dokken' Smoke test on Ruby ${{ matrix.ruby }}
env:
KITCHEN_YAML: kitchen.dokken.yml
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.7', '3.0', '3.1']
name: Linux Smoke test on Ruby ${{ matrix.ruby }}
ruby: ["3.1", "3.2"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- run: bundle exec kitchen test

linux-product:
name: Linux 'product' Smoke test on Ruby ${{ matrix.ruby }}
env:
MACHINE_USER: kitchen
MACHINE_PASS: K1tch3nY@ml!
Expand All @@ -32,84 +36,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.7', '3.0', '3.1']
name: Linux 'product' Smoke test on Ruby ${{ matrix.ruby }}
ruby: ["3.1", "3.2"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup Kitchen User
run: |
sudo -E useradd $MACHINE_USER --shell /bin/bash --create-home
sudo -E usermod -p `openssl passwd -1 $MACHINE_PASS` $MACHINE_USER
sudo -E usermod -aG sudo $MACHINE_USER
- name: Start SSHD
run: |
sudo mkdir -p /var/run/sshd
sudo service ssh restart
- name: Update path and sudo privs for Kitchen user
run: |
sudo echo 'Defaults secure_path="/opt/hostedtoolcache/Ruby/2.7.1/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"' | sudo tee /etc/sudoers.d/kitchen
sudo echo "" | sudo tee -a /etc/sudoers.d/kitchen
sudo echo "kitchen ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/kitchen
sudo echo "" | sudo tee -a /etc/sudoers.d/kitchen

- run: bundle exec kitchen test
linux-proxy:
env:
MACHINE_USER: kitchen
MACHINE_PASS: K1tch3nY@ml!
MACHINE_PORT: 22
KITCHEN_YAML: kitchen.proxy.yml
PROXY_TESTS_DIR: proxy_tests/files/default/scripts
PROXY_TESTS_REPO: proxy_tests/files/default/scripts/repo
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.7', '3.0', '3.1']
name: Linux 'proxy' Smoke test on Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup Kitchen User
run: |
sudo -E useradd $MACHINE_USER --shell /bin/bash --create-home
sudo -E usermod -p `openssl passwd -1 $MACHINE_PASS` $MACHINE_USER
sudo -E usermod -aG sudo $MACHINE_USER
- name: gem check
run: |
bundle exec which kitchen
- name: Start SSHD
run: |
sudo mkdir -p /var/run/sshd
sudo service ssh restart
- name: Install packages we need
run: |
sudo apt-get update
sudo apt-get -y install squid3 curl
- name: Checkout smurawski/proxy_tests repo
uses: actions/checkout@v3
with:
repository: smurawski/proxy_tests
path: proxy_tests
- name: Update path and sudo privs for Kitchen user
run: |
sudo echo 'Defaults secure_path="./vendor/bundle/ruby/2.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"' | sudo tee /etc/sudoers.d/kitchen
sudo echo "" | sudo tee -a /etc/sudoers.d/kitchen
sudo echo "kitchen ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/kitchen
sudo echo "" | sudo tee -a /etc/sudoers.d/kitchen
- name: Run the proxy test script
run: |
sudo -E $PROXY_TESTS_DIR/run_tests.sh kitchen \* \* /tmp/out.txt
cat /tmp/out.txt
echo ""
echo "===================="
echo "Tests finished."
echo "===================="
echo ""
sudo cat /var/log/squid/cache.log
sudo cat /var/log/squid/access.log
15 changes: 13 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
source "https://rubygems.org"

# Specify your gem"s dependencies in test-kitchen.gemspec
gemspec

group :test do
gem "rake"
gem "rb-readline"
gem "aruba", ">= 0.11", "< 3.0"
gem "countloc", "~> 0.4"
gem "cucumber", ">= 2.1", "< 8.0"
gem "fakefs", "~> 2.0"
gem "maruku", "~> 0.6"
gem "minitest", "~> 5.3", "< 5.16"
gem "mocha", "~> 2.0"
end

group :integration do
gem "berkshelf"
gem "kitchen-dokken"
Expand All @@ -12,4 +23,4 @@ end

group :chefstyle do
gem "chefstyle", "2.2.2"
end
end
12 changes: 3 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,18 @@ stages:
- job: Windows
strategy:
matrix:
Windows_Ruby27:
version: 2.7
machine_user: test_user
machine_pass: Pass@word1
machine_port: 5985
KITCHEN_YAML: kitchen.windows.yml
Windows_Ruby30:
version: 3.0
machine_user: test_user
machine_pass: Pass@word1
machine_port: 5985
KITCHEN_YAML: kitchen.windows.yml
WindowsProduct_Ruby27:
version: 2.7
Windows_Ruby31:
version: 3.1
machine_user: test_user
machine_pass: Pass@word1
machine_port: 5985
KITCHEN_YAML: kitchen.windows-product.yml
KITCHEN_YAML: kitchen.windows.yml
WindowsProduct_Ruby30:
version: 3.0
machine_user: test_user
Expand Down
1 change: 0 additions & 1 deletion docs/content/docs/drivers/openstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ driver:
openstack_api_key: [YOUR OPENSTACK API KEY] # AKA your OpenStack Password
openstack_auth_url: [YOUR OPENSTACK AUTH URL] # if you are using v3, API_URL/v3/auth/tokens
openstack_domain_id: [default is 'default'; otherwise YOUR OPENSTACK DOMAIN ID]
require_chef_omnibus: [e.g. 'true' or a version number if you need Chef]
image_ref: [SERVER IMAGE ID]
flavor_ref: [SERVER FLAVOR ID]
transport:
Expand Down
13 changes: 1 addition & 12 deletions test-kitchen.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
gem.executables = %w{kitchen}
gem.require_paths = ["lib"]

gem.required_ruby_version = ">= 2.7"
gem.required_ruby_version = ">= 3.0"

gem.add_dependency "bcrypt_pbkdf", "~> 1.0" # ed25519 ssh key support
gem.add_dependency "chef-utils", ">= 16.4.35"
Expand All @@ -37,15 +37,4 @@ Gem::Specification.new do |gem|
# Required to run the Chef provisioner local license check for remote systems
# TK is not under Chef EULA
gem.add_dependency "license-acceptance", ">= 1.0.11", "< 3.0" # pinning until we can confirm 3+ works

gem.add_development_dependency "rake"
gem.add_development_dependency "rb-readline"

gem.add_development_dependency "aruba", ">= 0.11", "< 3.0"
gem.add_development_dependency "countloc", "~> 0.4"
gem.add_development_dependency "cucumber", ">= 2.1", "< 8.0"
gem.add_development_dependency "fakefs", "~> 2.0"
gem.add_development_dependency "maruku", "~> 0.6"
gem.add_development_dependency "minitest", "~> 5.3", "< 5.16"
gem.add_development_dependency "mocha", "~> 2.0"
end

0 comments on commit d3b15ca

Please sign in to comment.