Skip to content

Commit ae97d92

Browse files
authored
Update GitHub Actions workflow for Copilot setup
Revert after
1 parent cbc6cd7 commit ae97d92

1 file changed

Lines changed: 34 additions & 4 deletions

File tree

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,53 @@
11
name: "Copilot Setup Steps"
2-
on: workflow_dispatch
2+
on:
3+
workflow_dispatch:
4+
push:
5+
paths: [.github/workflows/copilot-setup-steps.yml]
6+
pull_request:
7+
paths: [.github/workflows/copilot-setup-steps.yml]
38

49
jobs:
510
copilot-setup-steps:
611
runs-on: ubuntu-latest
712
permissions:
813
contents: read
14+
env:
15+
PIP_TIMEOUT: 600
16+
PIP_RETRIES: 2
17+
918
steps:
1019
- name: Checkout code
1120
uses: actions/checkout@v4
21+
with:
22+
# Ensures we check out the actual head branch on PRs
23+
ref: ${{ github.head_ref || github.ref_name }}
24+
25+
- name: Derive branch name
26+
id: branch
27+
shell: bash
28+
run: |
29+
BN="${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}"
30+
if [ -z "$BN" ]; then BN="$(git branch --show-current || true)"; fi
31+
echo "BRANCH_NAME=$BN" | tee -a "$GITHUB_ENV"
32+
echo "name=$BN" >> "$GITHUB_OUTPUT"
33+
1234
- name: Set up Python
1335
uses: actions/setup-python@v5
1436
with:
1537
python-version: "3.12"
1638
cache: "pip"
39+
1740
- name: Install package and dev dependencies
1841
run: |
19-
pip install -e .
20-
pip install tox pre-commit
42+
python -m pip install --upgrade pip
43+
python -m pip install ax-platform prefect prefect-slack
44+
python -m pip install -e .
45+
# python -m pip install tox pre-commit
2146
# pre-commit run --all-files
2247
# npx mint-mcp add docs.prefect.io
23-
# pre-commit install # don't install, since this has been a source of issues
48+
# pre-commit install
49+
50+
- name: Install branch-specific dependencies
51+
if: ${{ env.BRANCH_NAME == 'copilot/fix-382' }}
52+
run: |
53+
python -m pip install "ax-platform<1" prefect prefect-slack

0 commit comments

Comments
 (0)