From 19dafe3edb203c5646d5d4ec32a642affae7cbac Mon Sep 17 00:00:00 2001 From: Kun Jinkao <45487685+Snoopy1866@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:42:04 +0800 Subject: [PATCH] chore: update and rename workflow --- .github/workflows/{test.yml => check.yml} | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) rename .github/workflows/{test.yml => check.yml} (61%) diff --git a/.github/workflows/test.yml b/.github/workflows/check.yml similarity index 61% rename from .github/workflows/test.yml rename to .github/workflows/check.yml index ddc5086..adf0a53 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/check.yml @@ -1,12 +1,13 @@ -name: Test +name: Lint and Test on: push: branches: - - "**" + - "main" + pull_request: jobs: - pytest: + setup: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,5 +17,17 @@ jobs: python-version: "3.12" - name: install dependencies run: pip install -r requirements-dev.txt + + lint: + runs-on: ubuntu-latest + needs: setup + steps: + - name: run linter + run: black src + + pytest: + runs-on: ubuntu-latest + needs: setup + steps: - name: run tests run: pytest