Skip to content

Commit 3b354cd

Browse files
committed
Debug CI
1 parent 87484ae commit 3b354cd

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,28 @@ name: Python package
55

66
on:
77
push:
8-
branches: ['main']
8+
branches: ['**']
99
pull_request:
1010
branches: ['main']
1111

1212
permissions:
1313
contents: read
1414

1515
jobs:
16-
ruff:
16+
lint:
1717
runs-on: ubuntu-latest
1818

1919
steps:
2020
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
2121
with:
22-
ref: ${{ github.event.pull_request.head.sha || github.sha }}
22+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
23+
- name: Debug checkout ref
24+
run: |
25+
echo "event_name=${{ github.event_name }}"
26+
echo "github_ref=${{ github.ref }}"
27+
echo "github_sha=${{ github.sha }}"
28+
echo "pr_head_sha=${{ github.event.pull_request.head.sha }}"
29+
git rev-parse HEAD
2330
- name: Set up Python 3.14
2431
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
2532
with:
@@ -34,7 +41,7 @@ jobs:
3441
run: ruff format --check .
3542

3643
build:
37-
needs: ruff
44+
needs: lint
3845
runs-on: ${{ matrix.os }}
3946
strategy:
4047
fail-fast: false
@@ -45,7 +52,7 @@ jobs:
4552
steps:
4653
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
4754
with:
48-
ref: ${{ github.event.pull_request.head.sha || github.sha }}
55+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
4956
- name: Set up Python ${{ matrix.python-version }}
5057
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
5158
with:

0 commit comments

Comments
 (0)