Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: ensure GitHub Actions and pre-commit hooks are pinned #2576

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dev_adbc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down Expand Up @@ -287,7 +287,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/native-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down Expand Up @@ -283,7 +283,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down Expand Up @@ -392,7 +392,7 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- uses: 'google-github-actions/auth@v2'
- uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2
continue-on-error: true # if auth fails, bigquery driver tests should skip
with:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
Expand Down Expand Up @@ -449,7 +449,7 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- uses: 'google-github-actions/auth@v2'
- uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2
continue-on-error: true # if auth fails, bigquery driver tests should skip
with:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
Expand All @@ -465,7 +465,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down Expand Up @@ -549,7 +549,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down Expand Up @@ -659,7 +659,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/native-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-mamba: true
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-mamba: true
Expand Down Expand Up @@ -204,7 +204,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-mamba: true
Expand Down Expand Up @@ -268,7 +268,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-mamba: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
run: |
mv apache-arrow-adbc-${{ env.VERSION }}-rc0/KEYS .

- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
# The Unix script will set up conda itself
if: matrix.os == 'windows-latest'
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ jobs:
mv apache-arrow-adbc-$VERSION.tar.gz adbc/ci/linux-packages/

- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # v1.221.0
with:
ruby-version: ruby

Expand All @@ -354,7 +354,7 @@ jobs:
restore-keys: linux-${{ env.TASK_NAMESPACE }}-ccache-${{ matrix.target }}-

- name: Login to GitHub Container registry
uses: docker/login-action@v3
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -519,7 +519,7 @@ jobs:
echo "schedule: ${{ github.event.schedule }}" >> $GITHUB_STEP_SUMMARY
echo "ref: ${{ github.ref }}" >> $GITHUB_STEP_SUMMARY

- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down Expand Up @@ -1061,7 +1061,7 @@ jobs:
uses: actions/download-artifact@v4
with:
path: conda-packages
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
with:
miniforge-version: latest
use-only-tar-bz2: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/r-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r@14a7e741c1cb130261263aa1593718ba42cf443b # v2
with:
r-version: release
use-public-rspm: true
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
ADBC_FLIGHTSQL_TEST_URI="grpc://localhost:8080"
echo "ADBC_FLIGHTSQL_TEST_URI=${ADBC_FLIGHTSQL_TEST_URI}" >> $GITHUB_ENV

- uses: r-lib/actions/check-r-package@v2
- uses: r-lib/actions/check-r-package@14a7e741c1cb130261263aa1593718ba42cf443b # v2
env:
ADBC_SNOWFLAKE_TEST_URI: ${{ secrets.SNOWFLAKE_URI }}
R_KEEP_PKG_SOURCE: yes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r-extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r@14a7e741c1cb130261263aa1593718ba42cf443b # v2
with:
rversion: ${{ matrix.rversion }}
use-public-rspm: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
fetch-depth: 0
persist-credentials: false
submodules: recursive
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@e5457fe695e3787d415a42160e580fd154de1899 # v3
# The Unix script will set up conda itself
if: matrix.os == 'windows-latest'
with:
Expand Down
27 changes: 18 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ repos:
- id: trailing-whitespace
exclude: "^r/.*?/_snaps/.*?.md$"
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v18.1.7"
rev: deec0115cd2847f837ac9180c4b7d1edb423fe02 # v18.1.7
hooks:
- id: clang-format
types_or: [c, c++]
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
rev: e2c2116d86a80e72e7146a06e68b7c228afc6319 # v0.6.13
hooks:
- id: cmake-format
args: [--in-place]
Expand All @@ -60,13 +60,13 @@ repos:
- "--linelength=90"
- "--verbose=2"
- repo: https://github.com/golangci/golangci-lint
rev: v1.64.5
rev: 0a603e49e5e9870f5f9f2035bcbe42cd9620a9d5 # v1.64.5
hooks:
- id: golangci-lint
entry: bash -c 'cd go/adbc && golangci-lint run --fix --timeout 5m'
types_or: [go, go-mod]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
rev: a6273196190bb0f68caf1dc68073cf62c719f725 # v2.14.0
hooks:
- id: pretty-format-golang
args: [--autofix]
Expand All @@ -75,22 +75,22 @@ repos:
args: [--autofix]
types_or: [java]
- repo: https://github.com/psf/black
rev: 25.1.0
rev: 8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b # 25.1.0
hooks:
- id: black
types_or: [pyi, python]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.2
rev: bddd87797f8dfc07d2a10c894776018d9bec590b # 7.1.2
hooks:
- id: flake8
types_or: [python]
- repo: https://github.com/PyCQA/isort
rev: 6.0.0
rev: 0a0b7a830386ba6a31c2ec8316849ae4d1b8240d # 6.0.0
hooks:
- id: isort
types_or: [python]
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.2
rev: 9247866fce7128f2c0eaf4a09f437880397d4689 # v0.16.2
hooks:
- id: cython-lint
- repo: https://github.com/vala-lang/vala-lint
Expand All @@ -110,8 +110,17 @@ repos:
pass_filenames: true
files: '^c/include/arrow-adbc/.*\.h$'
entry: "./ci/scripts/run_cgo_drivermgr_check.sh"
# https://infra.apache.org/github-actions-policy.html
- id: check-pin
name: Ensure GitHub Actions and pre-commit hooks are pinned to a specific SHA
language: python
additional_dependencies:
- "ruamel.yaml==0.18.7"
pass_filenames: true
files: '(^\.pre-commit-config\.yaml$)|(^\.github/workflows/.*\.(yml|yaml)$)'
entry: "./ci/scripts/run_pre_commit_pin.py"
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # v1.0
hooks:
- id: fmt
name: rustfmt
Expand Down
Loading
Loading