Skip to content

Commit 215495a

Browse files
committed
fix result path
1 parent 748832f commit 215495a

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.github/workflows/comment_bot.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,23 @@ jobs:
3030
name: Debug
3131
runs-on: ubuntu-latest
3232
steps:
33+
# shallow clones not suitable to generate version number so use v1
3334
- name: Checkout Arrow
34-
uses: actions/checkout@v2
35+
uses: actions/checkout@v1
3536
with:
3637
path: arrow
37-
- uses: s-weigand/setup-conda@v1
38+
# because libgit2 is a dependency of crossbow so prefer conda
39+
- name: Setup Conda
40+
uses: s-weigand/setup-conda@v1
3841
with:
3942
update-conda: true
4043
python-version: 3.7
4144
conda-channels: conda-forge
42-
- run: |
45+
- name: Instal Archery and Crossbow dependencies
46+
run: |
4347
conda install -y --file arrow/ci/conda_env_crossbow.txt pygithub
44-
- run: |
4548
pip install -e arrow/dev/archery
46-
- name: Handle GH event
49+
- name: Handle Github comment event
4750
env:
4851
ARROW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4952
CROSSBOW_GITHUB_TOKEN: ${{ secrets.CROSSBOW_GITHUB_TOKEN }}

dev/archery/archery/bot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,13 @@ def submit(obj, task, group, dry_run):
267267
git.clone('https://github.com/{}'.format(obj['crossbow_repo']), 'crossbow')
268268

269269
# submit the crossbow tasks
270+
result = Path('result.yml').resolve()
270271
xbow = Crossbow('arrow/dev/tasks/crossbow.py')
271-
xbow.run('--output-file', 'result.yaml', 'submit', *args)
272+
xbow.run('--output-file', str(result), 'submit', *args)
272273

273274
# parse the result yml describing the submitted job
274275
yaml = YAML()
275-
with Path('result.yml').open() as fp:
276+
with result.open() as fp:
276277
job = yaml.load(fp)
277278

278279
# render the response comment's content

dev/archery/archery/tests/test_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import textwrap
77
import responses as rsps
88
import click
9-
from click.testing import CliRunner
109
from ruamel.yaml import YAML
1110

1211
from archery.bot import (
@@ -218,6 +217,7 @@ def handler(command, **kwargs):
218217

219218
# TODO(kszucs): properly mock it
220219
# def test_crossbow_submit():
220+
# from click.testing import CliRunner
221221
# runner = CliRunner()
222222
# result = runner.invoke(
223223
# bot, ['crossbow', 'submit', '-g', 'wheel', '--dry-run']

0 commit comments

Comments
 (0)