mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-13 13:02:56 +00:00
Run pre-commit in separate workflow
This commit is contained in:
5
.github/workflows/docker.yml
vendored
5
.github/workflows/docker.yml
vendored
@@ -7,14 +7,17 @@ on:
|
||||
- "binder/**"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- ".pre-commit-config.yaml"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
paths-ignore:
|
||||
- "*.md"
|
||||
- "binder/**"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- ".pre-commit-config.yaml"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -43,8 +46,6 @@ jobs:
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
make -C main dev-env
|
||||
- name: Run pre-commit hooks
|
||||
run: make -C main pre-commit-all
|
||||
- name: Build Docker Images
|
||||
run: make -C main build-test-all
|
||||
env:
|
||||
|
31
.github/workflows/pre-commit.yml
vendored
Normal file
31
.github/workflows/pre-commit.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Run pre-commit hooks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Run pre-commit hooks
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
!contains(github.event.head_commit.message, 'ci skip') &&
|
||||
!contains(github.event.pull_request.title, 'ci skip')
|
||||
steps:
|
||||
- name: Clone Main Repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: main
|
||||
- name: Set Up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install Dev Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install --upgrade pre-commit
|
||||
- name: Run pre-commit hooks
|
||||
run: make -C main pre-commit-all
|
Reference in New Issue
Block a user