-
Notifications
You must be signed in to change notification settings - Fork 5
94 lines (77 loc) · 2.25 KB
/
Copy pathtests.yml
File metadata and controls
94 lines (77 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Run tests
permissions:
contents: read
on:
workflow_call:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
code_format_and_lint:
name: Check code formatting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7.1.2
with:
enable-cache: true
- name: Install dependencies
run: uv sync
- name: Run code formatting checks
shell: bash
run: uv run ruff format --check
- name: Run code linting checks
continue-on-error: true
run: uv run ruff check --output-format=github .
spark_tests:
name: Run container tests
needs: code_format_and_lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run spark tests
shell: bash
continue-on-error: false
run: |
docker pull ghcr.io/berdatalakehouse/spark_notebook:main
echo "Running tests inside container..."
# slightly nasty hack
chmod 777 .
docker run --rm -e NB_USER=runner -v .:/tmp/cdm ghcr.io/berdatalakehouse/spark_notebook:main /bin/bash /tmp/cdm/scripts/run_tests.sh
- name: Send to Codecov
id: send_to_codecov
uses: codecov/codecov-action@v5.5.1
with:
files: coverage.xml
# fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
tests:
name: Run local tests (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: code_format_and_lint
strategy:
fail-fast: false
matrix:
python-version: ["3.13", "3.14"]
os: ["ubuntu-24.04"]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7.1.2
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --dev
- name: Run local tests
shell: bash
continue-on-error: false
run: uv run pytest -m "not requires_spark and not requires_ceph"