Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,19 @@ jobs:
- name: Run test
run: make -f Makefile check

ci-checks:
runs-on: ubuntu-latest
container: fedora:43 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install dependencies
run: dnf install -y make yamllint
- name: Run test
run: make -f Makefile yamllint

spelling-checks:
spelling-and-formatting-checks:
runs-on: ubuntu-latest
container: fedora:43 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- name: Install dependencies for Fedora
run: >
dnf install -y
clang
git
make
xmllint
which
yamllint
- uses: actions/checkout@v6
with:
persist-credentials: false
Expand All @@ -57,5 +49,9 @@ jobs:
- uses: baptiste0928/cargo-install@v3
with:
crate: typos-cli
- name: Run test
- name: Run spell check
run: make -f Makefile check-typos
- name: Run format check
run: make -f Makefile fmt-ci
- name: Run lint check
run: make -f Makefile yamllint
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,17 @@ website-copy: test-website-repo test-commit-msg clean website-distrib
(cd ./public; cp * -R ${WEBSITE_REPO})
(cd ${WEBSITE_REPO}; git add .; git commit -m "${COMMIT_MSG}")

fmt:
(cd ./docs/dbus ; $(MAKE) fmt)

fmt-ci:
(cd ./docs/dbus ; $(MAKE) fmt-ci)

.PHONY:
check
clean
fmt
fmt-ci
pdfs
test-commit-msg
test-website-repo
Expand Down
27 changes: 26 additions & 1 deletion docs/dbus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,33 @@ clean:
check-closed-insets:
@grep --quiet "^status open$$" DBusAPIReference.lyx ; if [ $$? -ne "1" ] ; then exit 1 ; fi

check: check-closed-insets
check-no-tabs:
grep --quiet -P "\t" ./blockdev.xml ; if [ $$? -ne "1" ] ; then exit 1 ; fi
grep --quiet -P "\t" ./filesystem.xml ; if [ $$? -ne "1" ] ; then exit 1 ; fi
grep --quiet -P "\t" ./manager.xml ; if [ $$? -ne "1" ] ; then exit 1 ; fi
grep --quiet -P "\t" ./pool.xml ; if [ $$? -ne "1" ] ; then exit 1 ; fi

check: check-closed-insets check-no-tabs

fmt:
xmllint --format ./blockdev.xml --output ./blockdev.xml
xmllint --format ./filesystem.xml --output ./filesystem.xml
xmllint --format ./manager.xml --output ./manager.xml
xmllint --format ./pool.xml --output ./pool.xml

fmt-ci:
@xmllint --format ./blockdev.xml --output ./blockdev.new.xml
diff --brief ./blockdev.xml ./blockdev.new.xml ; if [ $$? -eq "1" ] ; then exit 1 ; fi
@xmllint --format ./filesystem.xml --output ./filesystem.new.xml
diff --brief ./filesystem.xml ./filesystem.new.xml ; if [ $$? -eq "1" ] ; then exit 1 ; fi
@xmllint --format ./manager.xml --output ./manager.new.xml
diff --brief ./manager.xml ./manager.new.xml ; if [ $$? -eq "1" ] ; then exit 1 ; fi
@xmllint --format ./pool.xml --output ./pool.new.xml
diff --brief ./pool.xml ./pool.new.xml ; if [ $$? -eq "1" ] ; then exit 1 ; fi

.PHONY:
check
check-closed-insets
check-no-tabs
fmt
fmt-ci
Loading