-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.72 KB
/
Copy pathcross-platform-python.yml
File metadata and controls
63 lines (54 loc) · 1.72 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
name: Python Cross-Platform Tests
on:
push:
branches: [ master, main ]
paths:
- 'python/**'
- '.github/workflows/cross-platform-python.yml'
pull_request:
branches: [ master, main ]
paths:
- 'python/**'
- '.github/workflows/cross-platform-python.yml'
workflow_dispatch:
jobs:
python-package:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./python
strategy:
matrix:
python-version: ["3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'python/pyproject.toml'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel
pip install -e ".[dev,redis,s3,gcs]"
- name: Build package
run: |
python -m build
- name: Basic import test
run: |
python -c "import browserstate; print('Successfully imported browserstate package')"
python -c "import browserstate; print('Version: ' + getattr(browserstate, '__version__', 'unknown'))"
- name: Run tests
run: |
python -m pytest tests/ -k "not integration"
- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: python-package-${{ matrix.os }}
path: python/dist/*
retention-days: 7