From c45a679bc241f341c99db801a41fbb28913e8c49 Mon Sep 17 00:00:00 2001 From: j1c Date: Sun, 7 Apr 2024 19:31:25 -0400 Subject: [PATCH] separate build and checks --- .github/workflows/build.yml | 16 +--------------- .github/workflows/checks.yml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/checks.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f5bef7b..6129ad05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 00000000..1491617a --- /dev/null +++ b/.github/workflows/checks.yml @@ -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