Skip to content

Commit c778e21

Browse files
committed
add ci test
1 parent 9ede335 commit c778e21

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.9', '3.13']
15+
packages: ['pyspark>=4.0.0', 'pyspark==3.5.6']
16+
exclude:
17+
- python-version: '3.13'
18+
packages: 'pyspark==3.5.6'
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install uv
29+
run: |
30+
curl -LsSf https://astral.sh/uv/install.sh | sh
31+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
32+
33+
- name: Install dependencies
34+
run: |
35+
uv add --dev ${{ matrix.packages }}
36+
uv sync
37+
38+
- name: Run tests
39+
run: |
40+
uv run pytest -k "not test_huggingface_writer"

tests/test_huggingface_writer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ def spark():
1616

1717

1818
def token():
19+
if "HF_TOKEN" not in os.environ:
20+
pytest.skip("HF_TOKEN environment variable is not set")
1921
return os.environ["HF_TOKEN"]
2022

2123

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)