mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-14 21:42:57 +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/**"
|
- "binder/**"
|
||||||
- "docs/**"
|
- "docs/**"
|
||||||
- "examples/**"
|
- "examples/**"
|
||||||
|
- ".pre-commit-config.yaml"
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- main
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "*.md"
|
- "*.md"
|
||||||
- "binder/**"
|
- "binder/**"
|
||||||
- "docs/**"
|
- "docs/**"
|
||||||
- "examples/**"
|
- "examples/**"
|
||||||
|
- ".pre-commit-config.yaml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -43,8 +46,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
make -C main dev-env
|
make -C main dev-env
|
||||||
- name: Run pre-commit hooks
|
|
||||||
run: make -C main pre-commit-all
|
|
||||||
- name: Build Docker Images
|
- name: Build Docker Images
|
||||||
run: make -C main build-test-all
|
run: make -C main build-test-all
|
||||||
env:
|
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