From c534d3a700ffc052f6d39cbe545aa149e1136c42 Mon Sep 17 00:00:00 2001 From: "Keto D. Zhang" Date: Sun, 6 Oct 2024 18:56:17 -0700 Subject: [PATCH] ci: skip Python 3.9 test on main branch --- .github/workflows/pr.yml | 6 ++++-- .pre-commit-config.yaml | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 51e52fa..6cd7a06 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,9 +12,11 @@ jobs: fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] + branch: + - ${{ github.event.head.ref_name }} exclude: - - python-version: "3.9" - if: github.ref == 'refs/heads/main' + - branch: main + python-version: "3.9" steps: - uses: actions/checkout@v3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bbb5c00..7212142 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,11 @@ repos: - id: check-yaml - id: check-added-large-files + - repo: https://github.com/rhysd/actionlint + rev: v1.7.3 + hooks: + - id: actionlint + - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: 'v0.6.3'