From 1669610d511f20543648ccfb8aa98c58d58536c5 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 28 Sep 2021 19:48:04 -0700 Subject: [PATCH] Move Ubuntu / lint testing to GitHub actions Signed-off-by: Tim Smith --- .github/workflows/lint.yml | 20 ++++++++++++++++++++ .github/workflows/unit.yml | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/unit.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..844f87be --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,20 @@ +--- +name: lint + +'on': + pull_request: + push: + branches: + - main + +jobs: + chefstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.5 + bundler-cache: true + - uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR + - run: bundle exec cookstyle diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml new file mode 100644 index 00000000..7ce2b3a1 --- /dev/null +++ b/.github/workflows/unit.yml @@ -0,0 +1,23 @@ +--- +name: unit + +'on': + pull_request: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: ['2.5', '2.6', '2.7', '3.0'] + name: Unit test on ${{ matrix.os }} with 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