summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-07-02 22:09:14 -0700
committerTim Smith <tsmith@chef.io>2021-07-02 22:10:00 -0700
commit316ebfa7c3af498dae59e36d01a89d54ae7f1c14 (patch)
treea62d4386e9abbf7cdae582cc83fc1faefa27a021
parentbeb3094cf29fb08cae271aadb24bbbf6078d38c9 (diff)
downloadohai-316ebfa7c3af498dae59e36d01a89d54ae7f1c14.tar.gz
Switch testing to GitHub Actions
This allows us to test faster and on additional platforms Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--.expeditor/config.yml5
-rw-r--r--.expeditor/verify.pipeline.yml51
-rw-r--r--.github/dependabot.yml1
-rw-r--r--.github/workflows/exec.yml23
-rw-r--r--.github/workflows/lint.yml20
-rw-r--r--.github/workflows/unit.yml23
6 files changed, 67 insertions, 56 deletions
diff --git a/.expeditor/config.yml b/.expeditor/config.yml
index ec4a8eec..21c7e253 100644
--- a/.expeditor/config.yml
+++ b/.expeditor/config.yml
@@ -56,8 +56,3 @@ subscriptions:
actions:
- built_in:rollover_changelog
- built_in:publish_rubygems
-
-pipelines:
- - verify:
- description: Pull Request validation tests
- public: true
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
deleted file mode 100644
index 91b93a8e..00000000
--- a/.expeditor/verify.pipeline.yml
+++ /dev/null
@@ -1,51 +0,0 @@
----
-expeditor:
- defaults:
- buildkite:
- retry:
- automatic:
- limit: 1
- timeout_in_minutes: 30
-
-steps:
-- label: lint-chefstyle
- command:
- - .expeditor/run_linux_tests.sh "rake style"
- expeditor:
- executor:
- docker:
- image: ruby:2.7-buster
-
-- label: run-ohai
- command:
- - .expeditor/run_linux_tests.sh "bundle exec ohai"
- expeditor:
- executor:
- docker:
- image: ruby:2.7-buster
-
-- label: run-specs-ruby-2.7
- command:
- - .expeditor/run_linux_tests.sh rspec
- expeditor:
- executor:
- docker:
- image: ruby:2.7-buster
-
-- label: run-specs-ruby-3.0
- command:
- - .expeditor/run_linux_tests.sh rspec
- expeditor:
- executor:
- docker:
- image: ruby:3.0-buster
-
-- label: run-specs-windows
- command:
- - bundle install --jobs=7 --retry=3 --without=profile
- - bundle exec rake spec
- expeditor:
- executor:
- docker:
- host_os: windows
- image: rubydistros/windows-2019:2.7
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index fd5a504f..83190062 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,3 +1,4 @@
+---
version: 2
updates:
- package-ecosystem: bundler
diff --git a/.github/workflows/exec.yml b/.github/workflows/exec.yml
new file mode 100644
index 00000000..dc64b76e
--- /dev/null
+++ b/.github/workflows/exec.yml
@@ -0,0 +1,23 @@
+---
+name: exec
+
+'on':
+ pull_request:
+ push:
+ branches:
+ - master
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ruby: ['2.7', '3.0']
+ name: Unit test on Ruby ${{ matrix.ruby }}
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby }}
+ bundler-cache: true
+ - run: bundle exec ohai
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 00000000..797e202c
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,20 @@
+---
+name: lint
+
+'on':
+ pull_request:
+ push:
+ branches:
+ - master
+
+jobs:
+ chefstyle:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: 2.7
+ bundler-cache: true
+ - uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR
+ - run: bundle exec chefstyle
diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml
new file mode 100644
index 00000000..82b5e7b7
--- /dev/null
+++ b/.github/workflows/unit.yml
@@ -0,0 +1,23 @@
+---
+name: unit
+
+'on':
+ pull_request:
+ push:
+ branches:
+ - master
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ruby: ['2.7', '3.0']
+ name: Unit test on Ruby ${{ matrix.ruby }}
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby }}
+ bundler-cache: true
+ - run: bundle exec rake spec