Skip to content

fix: limit validation concurrency #373

fix: limit validation concurrency

fix: limit validation concurrency #373

Workflow file for this run

# Copyright (c) 2025 ADBC Drivers Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This is a common workflow for performing basic PR checks:
#
# - Run pre-commit
#
# It is also planned to cover things like checking the PR title/description
# format and ensuring issues and milestones are properly linked.
name: Dev
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
push:
branches:
- main
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
# Check the PR itself.
pr_standard:
name: "Check PR"
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 1
persist-credentials: false
- name: Check PR title format
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
python adbc_drivers_dev/title_check.py $(pwd) "$PR_TITLE"
lint:
name: "lint & pre-commit"
runs-on: ubuntu-latest
if: "github.event.action != 'edited'"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.x"
- name: Install
run: pip install pre-commit
- name: pre-commit (cache)
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: pre-commit
run: |
pre-commit run --all-files --color=always --show-diff-on-failure --verbose
- name: Analyze workflows with zizmor
uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa # v0.5.7
with:
advanced-security: false