Skip to content

Commit

Permalink
Merge pull request #1115 from VWS-Python/separate-lint-build
Browse files Browse the repository at this point in the history
Separate test and lint for CI simplicity
  • Loading branch information
adamtheturtle authored Oct 9, 2024
2 parents 0001970 + be73859 commit f384345
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 12 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

name: CI
name: Test

on:
push:
Expand All @@ -27,14 +27,6 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: "Lint"
run: |
uv run --extra=dev pre-commit run --all-files --hook-stage pre-commit --verbose
uv run --extra=dev pre-commit run --all-files --hook-stage pre-push --verbose
uv run --extra=dev pre-commit run --all-files --hook-stage manual --verbose
env:
UV_PYTHON: ${{ matrix.python-version }}

- name: "Run tests"
env:
# See https://pytest-cov.readthedocs.io/en/latest/plugins.html for why we
Expand All @@ -55,6 +47,3 @@ jobs:
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

- uses: pre-commit-ci/[email protected]
if: always()
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---

name: Lint

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# * is a special character in YAML so you have to quote this string
# Run at 1:00 every day
- cron: '0 1 * * *'

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: "Lint"
run: |
uv run --extra=dev pre-commit run --all-files --hook-stage pre-commit --verbose
uv run --extra=dev pre-commit run --all-files --hook-stage pre-push --verbose
uv run --extra=dev pre-commit run --all-files --hook-stage manual --verbose
env:
UV_PYTHON: ${{ matrix.python-version }}

- uses: pre-commit-ci/[email protected]
if: always()

0 comments on commit f384345

Please sign in to comment.