-
Notifications
You must be signed in to change notification settings - Fork 329
98 lines (86 loc) · 2.85 KB
/
test_be.yaml
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
95
96
97
98
name: Test BE
on:
push:
branches: [main]
pull_request:
env:
MARIMO_SKIP_UPDATE_CHECK: 1
jobs:
changes:
runs-on: ubuntu-latest
outputs:
backend: ${{ steps.filter.outputs.backend }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
backend:
- 'marimo/**'
- 'tests/**'
- 'pyproject.toml'
test_python:
needs: changes
if: ${{ needs.changes.outputs.backend == 'true' }}
name: ${{ matrix.os }} / Py ${{ matrix.python-version }} / ${{ matrix.dependencies }} deps
runs-on: ${{ matrix.os }}
timeout-minutes: 15
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
dependencies: ['core', 'core,optional']
python-version: ['3.9']
include:
- os: ubuntu-latest
python-version: '3.10'
dependencies: 'core'
- os: ubuntu-latest
python-version: '3.11'
dependencies: 'core'
- os: ubuntu-latest
python-version: '3.12'
dependencies: 'core'
- os: ubuntu-latest
python-version: '3.9'
dependencies: 'core,optional'
- os: ubuntu-latest
python-version: '3.10'
dependencies: 'core,optional'
- os: ubuntu-latest
python-version: '3.11'
dependencies: 'core,optional'
- os: ubuntu-latest
python-version: '3.12'
dependencies: 'core,optional'
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
- uses: actions/checkout@v4
- name: 🥚 Install Hatch
uses: pypa/hatch@install
# This step is needed since some of our tests rely on the index.html file
- name: Create assets directory, copy over index.html
run: |
mkdir -p marimo/_static/assets
cp frontend/index.html marimo/_static/index.html
cp frontend/public/favicon.ico marimo/_static/favicon.ico
- name: Lint
if: ${{ matrix.python-version == '3.12' }}
run: hatch run lint
- name: Typecheck
if: ${{ matrix.python-version == '3.12' }}
run: hatch run typecheck:check
# Test with minimal dependencies
- name: Test with minimal dependencies
if: ${{ matrix.dependencies == 'core' }}
run: |
hatch run +py=${{ matrix.python-version }} test:test -v tests/ -k "not test_cli" --durations=10
# Test with optional dependencies
- name: Test with optional dependencies
if: ${{ matrix.dependencies == 'core,optional' }}
run: |
hatch run +py=${{ matrix.python-version }} test-optional:test -v tests/ -k "not test_cli" --durations=10