💚 Fix CI workflows #77
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: | |
- mainline-criteo | |
jobs: | |
rspec: | |
# Some RSpec tests require a Windows environment | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install Chef | |
uses: actionshub/[email protected] | |
with: | |
version: latest | |
- name: Install Gems | |
run: chef gem install -N "" | |
if: false | |
env: | |
CHEF_LICENSE: accept-no-persist | |
- 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@v5 | |
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] | |
with: | |
version: ${{ inputs.chef_workstation_version }} | |
- 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 | |
markdownlint-cli2: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Run Markdown Lint | |
uses: DavidAnson/markdownlint-cli2-action@v16 | |
with: | |
globs: "**/*.md" | |
markdown-link-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gaurav-nelson/[email protected] | |
with: | |
use-quiet-mode: "yes" | |
use-verbose-mode: "yes" | |
check-modified-files-only: "yes" | |
base-branch: "mainline-criteo" | |
integration: | |
needs: | |
- rspec | |
- cookstyle | |
- yamllint | |
- markdownlint-cli2 | |
- markdown-link-check | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: | |
- "rockylinux-8" | |
suite: | |
- "smoke-war-stable" | |
- "smoke-war-latest" | |
fail-fast: false | |
steps: | |
- name: Check out code | |
uses: actions/checkout@main | |
- name: Install Chef | |
uses: actionshub/chef-install@main | |
- name: Dokken | |
uses: actionshub/[email protected] | |
env: | |
CHEF_VERSION: 17.9.59 # >= 18 not compatible with this cookbook | |
CHEF_LICENSE: accept-no-persist | |
KITCHEN_LOCAL_YAML: kitchen.dokken.yml | |
with: | |
suite: ${{ matrix.suite }} | |
os: ${{ matrix.os }} | |
- name: Print debug output on failure | |
if: failure() | |
run: | | |
set -x | |
sudo journalctl -l --since today | |
KITCHEN_LOCAL_YAML=kitchen.dokken.yml /usr/bin/kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl -l" |