Skip to content

Commit

Permalink
Clean workflow scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
cwlacewe committed Feb 20, 2025
1 parent 195f099 commit 14b77c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 41 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
pull_request:
types: [opened, synchronize, reopened]
branches: [develop]
# on:
# workflow_run:
# workflows: [Pre-commit]
# types: [completed]

# Declare default permissions as write only.
permissions: read-all
Expand All @@ -24,6 +20,7 @@ concurrency:

jobs:
PreCommit:
# Apply formatting and linting
permissions:
contents: write
issues: write
Expand Down
40 changes: 3 additions & 37 deletions .github/workflows/_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,6 @@ on:

permissions: {}

# on:
# pull_request:
# types: [opened, synchronize, reopened]
# branches: [develop]

# Declare default permissions as write only.
# permissions: read-all

# If another push to the same PR or branch happens while this workflow is still running,
# cancel the earlier run in favor of the next run.
#
# There's no point in testing an outdated version of the code. GitHub only allows
# a limited number of job runners to be active at the same time, so it's better to cancel
# pointless jobs early so that more useful jobs can run sooner.
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

jobs:
Pre-Commit:
runs-on: ubuntu-latest
Expand All @@ -35,29 +17,13 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7
with:
submodules: false
- uses: actions/setup-python@v4
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: 3.x
- uses: pre-commit/[email protected]
- uses: pre-commit-ci/[email protected]
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
if: always()
- if: failure()
run: |
echo 'Pre-commit failed. Please fix issues.'
exit 1
# pre-success:
# runs-on: ubuntu-latest
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
# steps:
# - run: echo 'Pre-commit completed successfully.'
# pre-failure:
# runs-on: ubuntu-latest
# if: ${{ github.event.workflow_run.conclusion == 'failure' }}
# steps:
# - run: echo 'Pre-commit failed. Please fix issues.'
# pre-exit:
# needs: pre-failure
# runs-on: ubuntu-latest
# steps:
# - run: exit 1

0 comments on commit 14b77c3

Please sign in to comment.