Skip to content

Commit 2bffd3a

Browse files
committed
feat(gcs): initial google cloud storage support
1 parent 3c2f606 commit 2bffd3a

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ jobs:
4747
fi
4848
4949
python -m pip install -e .[test]
50+
51+
- name: Set up Cloud SDK
52+
uses: google-github-actions/setup-gcloud@v0
53+
with:
54+
project_id: siuba-tests
55+
service_account_key: ${{ secrets.GCP_SA_KEY }}
56+
export_default_credentials: true
57+
5058
- name: Run tests
5159
run: |
5260
pytest pins -m 'not fs_rsc and not skip_on_github' $PYTEST_OPTS

pins/tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414

1515

1616
# Based on https://github.com/machow/siuba/blob/main/siuba/tests/helpers.py
17-
BACKEND_MARKS = ["fs_s3", "fs_file", "fs_rsc"]
17+
BACKEND_MARKS = ["fs_s3", "fs_file", "fs_gcs", "fs_rsc"]
1818

1919
# parameters that can be used more than once per session
2020
params_safe = [
2121
pytest.param(lambda: BoardBuilder("file"), id="file", marks=m.fs_file),
2222
pytest.param(lambda: BoardBuilder("s3"), id="s3", marks=m.fs_s3),
23+
pytest.param(lambda: BoardBuilder("gcs"), id="s3", marks=m.fs_gcs),
2324
]
2425

2526
# rsc should only be used once, because users are created at docker setup time

pins/tests/helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
BOARD_CONFIG = {
2525
"file": {"path": ["PINS_TEST_FILE__PATH", None]},
2626
"s3": {"path": ["PINS_TEST_S3__PATH", "ci-pins"]},
27+
"gcs": {"path": ["PINS_TEST_GCS__PATH", "ci-pins"]},
2728
"rsc": {"path": ["PINS_TEST_RSC__PATH", RSC_SERVER_URL]},
2829
# TODO(question): R pins has the whole server a board
2930
# but it's a bit easier to test by (optionally) allowing a user

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ aws =
4040
s3fs
4141
azure =
4242
adlfs
43+
gcs =
44+
gcsfs
4345

4446
doc =
4547
sphinx
@@ -53,6 +55,7 @@ test =
5355
pytest-dotenv
5456
s3fs
5557
adlfs
58+
gcsfs
5659

5760

5861
[bdist_wheel]

0 commit comments

Comments
 (0)