Update Actions (#173) #160
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: ci | |
"on": | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
rspec: | |
# This needs to run on a Windows host due to expecting windows paths in tests | |
runs-on: windows-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install Chef | |
uses: actionshub/[email protected] | |
- name: Run RSpec | |
run: chef exec rspec -f j -o tmp/rspec_results.json -f p | |
env: | |
CHEF_LICENSE: accept-no-persist | |
- name: RSpec Report | |
uses: SonicGarden/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
json-path: tmp/rspec_results.json | |
if: always() | |
cookstyle: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install Chef | |
uses: actionshub/[email protected] | |
- name: Run Cookstyle | |
run: chef exec cookstyle --display-cop-names --extra-details | |
env: | |
CHEF_LICENSE: accept-no-persist | |
yamllint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Run yaml Lint | |
uses: actionshub/yamllint@main | |
mdl: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Run Markdown Lint | |
uses: actionshub/[email protected] | |
# This needs to run on vagrant due to the fact these nodes reboot during their | |
# runs | |
integration: | |
needs: [mdl, yamllint, cookstyle, rspec] | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- "windows-2012r2" | |
- "windows-2016" | |
- "windows-2019" | |
suite: | |
- "powershell5" | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install Chef | |
uses: actionshub/[email protected] | |
- name: test-kitchen | |
uses: actionshub/[email protected] | |
env: | |
CHEF_LICENSE: accept-no-persist | |
with: | |
suite: ${{ matrix.suite }} | |
os: ${{ matrix.os }} |