Skip to content

elastic migration docs #2137

elastic migration docs

elastic migration docs #2137

Workflow file for this run

---
name: Style check
env:
# Force the stdout and stderr streams to be unbuffered
PYTHONUNBUFFERED: 1
on:
pull_request:
types:
- synchronize
- reopened
- opened
jobs:
stylecheck:
runs-on: ubuntu-latest
strategy:
matrix:
check_type: [spellcheck, kbcheck, md-lint]
steps:
# Add setup steps per check here
- uses: actions/checkout@v4
- name: Install Aspell
if: matrix.check_type == 'spellcheck'
run: sudo apt-get update && sudo apt-get install -y aspell aspell-en
- name: Set up Python
if: matrix.check_type == 'kbcheck'
run: |
curl -Ls https://astral.sh/uv/install.sh | sh
uv python install 3.12
- name: Setup md-lint environment
if: matrix.check_type == 'md-lint'
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install markdownlint-cli2
if: matrix.check_type == 'md-lint'
run: yarn add -D markdownlint-cli2
# Run the checks here
- name: Run checks
id: check_step
run: |
if [[ "${{ matrix.check_type }}" == "spellcheck" ]]; then
yarn check-spelling
exit_code=$?
elif [[ "${{ matrix.check_type }}" == "kbcheck" ]]; then
yarn check-kb
exit_code=$?
elif [[ "${{ matrix.check_type }}" == "md-lint" ]]; then
yarn check-markdown
exit_code=$?
fi
if [[ $exit_code -ne 0 ]]; then
echo "::error::${{ matrix.check_type }} check failed. See logs for details."
exit 1
fi
- name: Set check status
if: steps.check_step.outcome != 'success'
uses: actions/github-script@v6
with:
script: |
core.setFailed('${{ matrix.check_type }} check failed.');
check_overall_status:
needs: stylecheck
runs-on: ubuntu-latest
if: always() # run the job even if stylecheck fails
steps:
- name: Check overall results
if: needs.stylecheck.result != 'success'
run: |
echo "::error::One or more checks of the style check failed."
exit 1