-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-dependency-isolation.yml
More file actions
59 lines (52 loc) · 1.92 KB
/
Copy pathpython-dependency-isolation.yml
File metadata and controls
59 lines (52 loc) · 1.92 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
name: Python Dependency Isolation Tests
on:
push:
branches: [ master, main ]
paths:
- 'python/**'
- '.github/workflows/python-dependency-isolation.yml'
pull_request:
branches: [ master, main ]
paths:
- 'python/**'
- '.github/workflows/python-dependency-isolation.yml'
workflow_dispatch:
jobs:
dependency-test:
runs-on: ubuntu-latest
strategy:
matrix:
test-config:
- name: Base Import Without Dependencies
dependencies: "dev"
test-command: >-
python -c "import browserstate; print('Successfully imported browserstate')" &&
python -c "import browserstate.storage.local_storage; print('Successfully imported LocalStorage')" &&
python -m pytest tests/test_lazy_imports.py -v
- name: Redis Storage Only
dependencies: "dev,redis"
test-command: python -c "from browserstate import RedisStorage; print('Successfully imported RedisStorage')"
- name: S3 Storage Only
dependencies: "dev,s3"
test-command: python -c "from browserstate import S3Storage; print('Successfully imported S3Storage')"
- name: GCS Storage Only
dependencies: "dev,gcs"
test-command: python -c "from browserstate import GCSStorage; print('Successfully imported GCSStorage')"
name: ${{ matrix.test-config.name }}
defaults:
run:
working-directory: ./python
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: 'python/pyproject.toml'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[${{ matrix.test-config.dependencies }}]"
- name: Run tests
run: ${{ matrix.test-config.test-command }}