Skip to content

Fixed formatter to indent trailing comments in bodies and add empty lines according to test expectations #274

Fixed formatter to indent trailing comments in bodies and add empty lines according to test expectations

Fixed formatter to indent trailing comments in bodies and add empty lines according to test expectations #274

Workflow file for this run

# This workflow installs the necessary dependencies, runs make check, and
# checks if there are any edits. It should be very similar to what developers
# are expected to do locally. We want to ensure that all tests pass (make
# check succeeds) and that there is no additional formatting / untracked
# files generated.
#
# Note that make check is a bit special in this repo, it has some things you
# might not expect:
# 1. It doesn't only run tests, it also runs formatters and linters
# 2. It installs the CFEngine CLI, so that shell tests will work
name: Run make check
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv
sudo apt-get install npm
npm install --global prettier
- name: Set python version file for uv
run: |
echo "${{ matrix.python-version }}" > .python-version
- name: Run make check
run: |
make check
- name: Reset python version file
run: |
git restore .python-version
- name: See if there are changes
run: |
git diff --exit-code
git ls-files --other --directory --exclude-standard | sed q1