Skip to content

ci(workflows): General improvements and fixes #10544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 11 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- master
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
types: [opened, reopened, synchronize, labeled]

concurrency:
group: pre-commit-${{github.event.pull_request.number || github.ref}}
Expand All @@ -15,8 +15,10 @@ concurrency:
jobs:
lint:
if: |
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge') ||
github.event_name != 'pull_request'
contains(github.event.pull_request.labels.*.name, 'Re-trigger Pre-commit Hooks')
name: Check if fixes are needed
runs-on: ubuntu-latest
steps:
Expand All @@ -25,6 +27,12 @@ jobs:
with:
fetch-depth: 2

- name: Remove Label
if: contains(github.event.pull_request.labels.*.name, 'Re-trigger Pre-commit Hooks')
run: gh pr edit ${{ github.event.number }} --remove-label 'Re-trigger Pre-commit Hooks'
env:
GH_TOKEN: ${{ github.token }}

- name: Set up Python 3
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -65,7 +73,7 @@ jobs:
key: ${{ steps.restore-cache.outputs.cache-primary-key }}

- name: Push changes using pre-commit-ci-lite
uses: pre-commit-ci/lite-action@v1.0.2
uses: pre-commit-ci/lite-action@v1.1.0
# Only push changes in PRs
if: ${{ always() && github.event_name == 'pull_request' }}
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches:
- master
- release/v2.x
- release/*
pull_request:
paths:
- 'cores/**'
Expand Down Expand Up @@ -47,13 +47,15 @@ jobs:
cmake-check:
name: Check cmake file
runs-on: ubuntu-latest
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'release/')) }}
steps:
- uses: actions/checkout@v4
- run: bash ./.github/scripts/check-cmakelists.sh

gen-chunks:
name: Generate chunks
runs-on: ubuntu-latest
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'release/')) }}
outputs:
build_all: ${{ steps.set-chunks.outputs.build_all }}
build_libraries: ${{ steps.set-chunks.outputs.build_libraries }}
Expand Down Expand Up @@ -307,7 +309,7 @@ jobs:
#Upload PR number as artifact
upload-pr-number:
name: Upload PR number
if: github.event_name == 'pull_request'
if: ${{ github.event_name == 'pull_request' && !startsWith(github.head_ref, 'release/') }}
runs-on: ubuntu-latest
steps:
- name: Save the PR number in an artifact
Expand Down
8 changes: 4 additions & 4 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cryptography==43.0.1
--only-binary cryptography
pytest-cov==5.0.0
pytest-embedded-serial-esp==1.11.6
pytest-embedded-arduino==1.11.6
pytest-embedded-wokwi==1.11.6
pytest-embedded-qemu==1.11.6
pytest-embedded-serial-esp==1.11.8
pytest-embedded-arduino==1.11.8
pytest-embedded-wokwi==1.11.8
pytest-embedded-qemu==1.11.8
2 changes: 1 addition & 1 deletion tools/pre-commit/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pre-commit==3.7.1
pre-commit==4.0.1
docutils==0.16
Loading