Skip to content

Commit 567cf0a

Browse files
committed
Revert run all workflows
1 parent 982058c commit 567cf0a

27 files changed

Lines changed: 4909 additions & 104 deletions

.github/workflows/archery.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Archery & Crossbow
19+
20+
on:
21+
push:
22+
branches:
23+
- '**'
24+
- '!dependabot/**'
25+
tags:
26+
- '**'
27+
paths:
28+
- '.dockerignore'
29+
- '.github/workflows/archery.yml'
30+
- 'dev/archery/**'
31+
- 'dev/tasks/**'
32+
- 'compose.yaml'
33+
pull_request:
34+
paths:
35+
- '.dockerignore'
36+
- '.github/workflows/archery.yml'
37+
- 'dev/archery/**'
38+
- 'dev/tasks/**'
39+
- 'compose.yaml'
40+
41+
env:
42+
ARCHERY_DEBUG: 1
43+
ARCHERY_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
44+
45+
concurrency:
46+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
47+
cancel-in-progress: true
48+
49+
permissions:
50+
contents: read
51+
52+
jobs:
53+
54+
test:
55+
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
56+
name: Archery Unittests and Crossbow Check Config
57+
runs-on: ubuntu-latest
58+
timeout-minutes: 15
59+
steps:
60+
- name: Checkout Arrow
61+
uses: actions/checkout@v6
62+
with:
63+
fetch-depth: 0
64+
- name: Git Fixup
65+
shell: bash
66+
run: git branch $ARCHERY_DEFAULT_BRANCH origin/$ARCHERY_DEFAULT_BRANCH || true
67+
- name: Setup Python
68+
uses: actions/setup-python@v6
69+
with:
70+
python-version: '3.12'
71+
- name: Install pygit2 binary wheel
72+
run: pip install pygit2 --only-binary pygit2
73+
- name: Install Archery, Crossbow- and Test Dependencies
74+
run: |
75+
pip install -e dev/archery[all]
76+
pip install -r dev/archery/requirements-test.txt
77+
- name: Archery Unittests
78+
working-directory: dev/archery
79+
run: pytest -v archery
80+
- name: Archery Docker Validation
81+
run: archery docker check-config
82+
- name: Crossbow Check Config
83+
working-directory: dev/tasks
84+
run: archery crossbow check-config

.github/workflows/check_labels.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Check Labels Reusable
19+
20+
on:
21+
workflow_call:
22+
inputs:
23+
parent-workflow:
24+
description: "The parent workflow filename (without .yml)"
25+
required: true
26+
type: string
27+
outputs:
28+
ci-extra-labels:
29+
description: "The extra CI labels"
30+
value: ${{ jobs.check-labels.outputs.ci-extra-labels }}
31+
force:
32+
description: "Whether to force running the jobs"
33+
value: ${{ jobs.check-labels.outputs.force }}
34+
35+
permissions:
36+
contents: read
37+
pull-requests: read
38+
39+
jobs:
40+
check-labels:
41+
name: Check labels
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 5
44+
outputs:
45+
ci-extra-labels: ${{ steps.check.outputs.ci-extra-labels }}
46+
force: ${{ steps.check.outputs.force }}
47+
steps:
48+
- name: Checkout Arrow
49+
if: github.event_name == 'pull_request'
50+
uses: actions/checkout@v6
51+
- name: Check
52+
id: check
53+
env:
54+
GH_TOKEN: ${{ github.token }}
55+
run: |
56+
set -ex
57+
case "${GITHUB_EVENT_NAME}" in
58+
push|schedule|workflow_dispatch)
59+
echo "force=true" >> "${GITHUB_OUTPUT}"
60+
;;
61+
pull_request)
62+
{
63+
echo "ci-extra-labels<<LABELS"
64+
gh pr view ${{ github.event.number }} \
65+
--jq '[.labels[].name | select(startswith("CI: Extra"))]' \
66+
--json labels \
67+
--repo ${GITHUB_REPOSITORY}
68+
echo "LABELS"
69+
} >> "${GITHUB_OUTPUT}"
70+
git fetch origin ${GITHUB_BASE_REF}
71+
git diff --stat origin/${GITHUB_BASE_REF}..
72+
if git diff --stat origin/${GITHUB_BASE_REF}.. | \
73+
grep \
74+
--fixed-strings ".github/workflows/${{ inputs.parent-workflow }}.yml" \
75+
--quiet; then
76+
echo "force=true" >> "${GITHUB_OUTPUT}"
77+
fi
78+
;;
79+
esac

.github/workflows/comment_bot.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Comment Bot
19+
20+
on:
21+
# TODO(kszucs): support pull_request_review_comment
22+
issue_comment:
23+
types:
24+
- created
25+
- edited
26+
27+
permissions:
28+
contents: read
29+
30+
jobs:
31+
crossbow:
32+
name: Listen!
33+
if: startsWith(github.event.comment.body, '@github-actions crossbow')
34+
runs-on: ubuntu-latest
35+
permissions:
36+
pull-requests: write
37+
steps:
38+
- name: Checkout Arrow
39+
uses: actions/checkout@v6
40+
with:
41+
path: arrow
42+
# fetch the tags for version number generation
43+
fetch-depth: 0
44+
- name: Set up Python
45+
uses: actions/setup-python@v6
46+
with:
47+
python-version: 3.12
48+
- name: Install Archery and Crossbow dependencies
49+
run: pip install -e arrow/dev/archery[bot]
50+
- name: Handle GitHub comment event
51+
env:
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
CROSSBOW_GITHUB_TOKEN: ${{ secrets.CROSSBOW_GITHUB_TOKEN }}
54+
run: |
55+
archery --debug trigger-bot \
56+
--event-name ${{ github.event_name }} \
57+
--event-payload ${{ github.event_path }}
58+
59+
issue_assign:
60+
name: "Assign issue"
61+
permissions:
62+
issues: write
63+
if: github.event.comment.body == 'take'
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/github-script@v8
67+
with:
68+
github-token: ${{ secrets.GITHUB_TOKEN }}
69+
script: |
70+
github.rest.issues.addAssignees({
71+
owner: context.repo.owner,
72+
repo: context.repo.repo,
73+
issue_number: context.payload.issue.number,
74+
assignees: context.payload.comment.user.login
75+
});

0 commit comments

Comments
 (0)