summaryrefslogtreecommitdiff
path: root/.github
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 /.github
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>
Diffstat (limited to '.github')
-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
4 files changed, 67 insertions, 0 deletions
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