Skip to content

Cache DNF cache and build CI in master to register shared caches for branches and PR #21

Cache DNF cache and build CI in master to register shared caches for branches and PR

Cache DNF cache and build CI in master to register shared caches for branches and PR #21

Workflow file for this run

---
name: Check Rust Format
on:
pull_request:
branches: ["main"]
jobs:
build:
name: Check Style
runs-on: ubuntu-22.04
container: fedora:latest
steps:
- name: Install Dependencies
run: |
dnf -y install git rustfmt codespell make
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup
if: ${{ github.event.pull_request.base.sha }}
run: |
git config --global --add safe.directory /__w/kryoptic/kryoptic
git fetch origin main ${{ github.event.pull_request.base.sha }}
- name: Run rustfmt
run: |
make fix-format
LINES=`git diff -U0 --no-color |wc -l`; \
if [ "$LINES" != "0" ]; then \
echo "Rustfmt issues detected"; \
git diff -U0 --no-color
exit 1; \
else \
echo "Rustfmt is happy"; \
fi
- name: Codespell
run: make check-spell