From baf2c46ca8003f5c2ba8e047764d03f9054d6ff6 Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Thu, 25 Aug 2022 09:08:23 -0700 Subject: [PATCH] Split out linting CI from testing --- .github/workflows/lint.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 4 ---- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..7926fa2 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,33 @@ +name: lint + +on: [push, pull_request] + +jobs: + default: + runs-on: ${{ matrix.os }}-latest + strategy: + matrix: + os: [ubuntu] + python-version: ["3.10"] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ".[lint]" + + - name: Lint + run: pre-commit run --all-files --show-diff-on-failure --color always diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4075800..e26f891 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,10 +28,6 @@ jobs: run: | python -m pip install --upgrade pip pip install ".[test]" - pip install ".[lint]" - - - name: Lint - run: pre-commit run --all-files --show-diff-on-failure --color always - name: Test run: |