Skip to content

Update Actions (#173) #160

Update Actions (#173)

Update Actions (#173) #160

Workflow file for this run

---
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/chef-install@3.0.0
- 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/rspec-report-action@v3.0.0
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/chef-install@3.0.0
- 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/markdownlint@v3.1.4
# 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/chef-install@3.0.0
- name: test-kitchen
uses: actionshub/test-kitchen@3.0.0
env:
CHEF_LICENSE: accept-no-persist
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}