Skip to content

Commit

Permalink
separate build and checks
Browse files Browse the repository at this point in the history
  • Loading branch information
j1c committed Apr 7, 2024
1 parent 056a260 commit c45a679
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- "deploy"
- "main"
pull_request:
# pull_request:
workflow_call:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand Down Expand Up @@ -33,17 +33,3 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html

code-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Run Format Check
run: |
pip install -U pip setuptools wheel black isort
black --check --diff ./m2g
isort --check-only --profile black ./m2g
23 changes: 23 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: m2g code check
on:
push:
branches:
- "deploy"
- "main"
pull_request:
workflow_call:

jobs:
code-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Run Format Check
run: |
pip install -U pip setuptools wheel black isort
black --check --diff ./m2g
isort --check-only --profile black ./m2g

0 comments on commit c45a679

Please sign in to comment.