mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-03-26 19:03:16 +00:00
ci: Check if tree is clean before running other jobs
Run make format and check if the tree is still clean before running other CI jobs. Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@@ -16,6 +16,37 @@ on:
|
||||
schedule:
|
||||
- cron: "0 6 * * *"
|
||||
jobs:
|
||||
check-tree-clean:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
cache: pip
|
||||
|
||||
- name: Install tox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install tox
|
||||
|
||||
- name: Run make format
|
||||
run: |
|
||||
make format
|
||||
|
||||
- name: Check if tree is clean
|
||||
run: |
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "There are uncommitted changes!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
linter:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
@@ -55,6 +86,8 @@ jobs:
|
||||
run: |
|
||||
find . -type f -iname '*.sh' -exec shellcheck {} \;
|
||||
working-directory: ${{ env.collection_dir }}
|
||||
needs:
|
||||
- check-tree-clean
|
||||
|
||||
sanity:
|
||||
uses: ansible-network/github_actions/.github/workflows/sanity.yml@main
|
||||
|
||||
Reference in New Issue
Block a user