Skip to content

Commit f349023

Browse files
authored
chore: generate github actions workflows (#94)
## What's Changed Generates GitHub Actions workflows using adbc-gen-workflow from https://github.com/adbc-drivers/dev. Includes a few other fixes to get things mostly running: - Fixes a missing import in go/go.mod that I missed in #31 - Fixes some imports in go/pkg I missed in #31 - Adds a basic pixi.toml and empty validation/tests dir Closes #85
1 parent e622477 commit f349023

File tree

14 files changed

+2669
-73
lines changed

14 files changed

+2669
-73
lines changed

.github/workflows/dev.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright (c) 2025 ADBC Drivers Contributors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# This is a common workflow for performing basic PR checks like running
16+
# pre-commit.
17+
18+
name: Dev
19+
20+
on:
21+
pull_request: {}
22+
push:
23+
branches:
24+
- main
25+
26+
concurrency:
27+
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
28+
cancel-in-progress: true
29+
30+
defaults:
31+
run:
32+
shell: bash
33+
34+
permissions:
35+
contents: read
36+
37+
jobs:
38+
lint:
39+
name: "lint & pre-commit"
40+
runs-on: ubuntu-latest
41+
42+
steps:
43+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
44+
with:
45+
fetch-depth: 0
46+
persist-credentials: false
47+
48+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
49+
with:
50+
cache-dependency-path: go/go.sum
51+
check-latest: true
52+
go-version-file: go/go.mod
53+
54+
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
55+
with:
56+
python-version: "3.x"
57+
58+
- name: Install
59+
run: pip install pre-commit
60+
61+
- name: pre-commit (cache)
62+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
63+
with:
64+
path: ~/.cache/pre-commit
65+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
66+
67+
- name: pre-commit
68+
run: |
69+
pre-commit run --all-files --color=always --show-diff-on-failure --verbose

.github/workflows/dev.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/dev_issues.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright (c) 2025 ADBC Drivers Contributors
2+
#
3+
# This file has been modified from its original version, which is
4+
# under the Apache License:
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
name: Issues Bot
19+
20+
on:
21+
issue_comment:
22+
types:
23+
- created
24+
- edited
25+
26+
jobs:
27+
issue_assign:
28+
name: "Assign issue"
29+
permissions:
30+
issues: write
31+
if: github.event.comment.body == 'take'
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
35+
with:
36+
github-token: ${{ secrets.GITHUB_TOKEN }}
37+
script: |
38+
github.rest.issues.addAssignees({
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
issue_number: context.payload.issue.number,
42+
assignees: context.payload.comment.user.login
43+
});

.github/workflows/dev_pr.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright (c) 2025 ADBC Drivers Contributors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# This is a common workflow for performing basic PR checks, like ensuring the
16+
# title format.
17+
18+
name: Dev PR
19+
20+
on:
21+
pull_request_target:
22+
types:
23+
- opened
24+
- edited
25+
- synchronize
26+
- ready_for_review
27+
- review_requested
28+
29+
concurrency:
30+
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
31+
cancel-in-progress: true
32+
33+
defaults:
34+
run:
35+
shell: bash
36+
37+
permissions:
38+
contents: read
39+
40+
jobs:
41+
pr_standard:
42+
name: "Check PR"
43+
runs-on: ubuntu-latest
44+
if: github.event_name == 'pull_request'
45+
46+
steps:
47+
- name: Check PR title format
48+
env:
49+
PR_TITLE: ${{ github.event.pull_request.title }}
50+
run: |
51+
git clone --depth 1 https://github.com/adbc-drivers/dev
52+
python dev/adbc_drivers_dev/title_check.py $(pwd) "$PR_TITLE"
53+
54+
# TODO: assign milestone

0 commit comments

Comments
 (0)