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