-
-
Notifications
You must be signed in to change notification settings - Fork 329
65 lines (63 loc) · 2.25 KB
/
.hatch-run.yml
File metadata and controls
65 lines (63 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: hatch-run
on:
workflow_call:
inputs:
job-name:
required: true
type: string
run-cmd:
required: true
type: string
runs-on:
required: false
type: string
default: '["ubuntu-latest"]'
python-version:
required: false
type: string
default: '["3.x"]'
secrets:
node-auth-token:
required: false
pypi-username:
required: false
pypi-password:
required: false
jobs:
hatch:
name: ${{ format(inputs.job-name, matrix.python-version, matrix.runs-on) }}
strategy:
matrix:
python-version: ${{ fromJson(inputs.python-version) }}
runs-on: ${{ fromJson(inputs.runs-on) }}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- if: runner.os == 'Windows'
name: Cache Playwright Install
uses: actions/cache@v5
with:
path: C:\Users\runneradmin\AppData\Local\ms-playwright\
key: ${{ runner.os }}-playwright
# FIXME: Temporarily added setup-node to fix lack of "Trusted Publishing" in Bun
# Ref: https://github.com/oven-sh/bun/issues/15601
- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install Python Dependencies
run: pip install hatch
- name: Run Scripts
env:
NPM_CONFIG_TOKEN: ${{ secrets.node-auth-token }}
HATCH_INDEX_USER: ${{ secrets.pypi-username }}
HATCH_INDEX_AUTH: ${{ secrets.pypi-password }}
run: ${{ inputs.run-cmd }}