Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Commit d0e43ef

Browse files
authored
ci: fix environment variable references in system tests (#109)
* ci: fix environment variable references in system tests * test: fix misspelling of exception * ci: bring back usage of head sha
1 parent e9c9535 commit d0e43ef

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.github/workflows/system-tests-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- name: checkout
2828
uses: actions/checkout@v2
2929
with:
30+
ref: ${{ github.event.pull_request.head.sha }}
3031
path: ibis_bigquery
3132

3233
- name: set up python ${{ matrix.python-version }}
@@ -52,10 +53,9 @@ jobs:
5253
GCLOUD_KEY_PASSPHRASE: ${{ secrets.GCLOUD_KEY_PASSPHRASE }}
5354

5455
- name: run tests
55-
run: python -m pytest ./ibis_bigquery/tests/system --save-dataset
56+
run: GOOGLE_APPLICATION_CREDENTIALS="$HOME/secrets/gcloud-service-key.json" python -m pytest ./ibis_bigquery/tests/system --save-dataset
5657
env:
5758
GOOGLE_BIGQUERY_PROJECT_ID: ibis-gbq
58-
GOOGLE_APPLICATION_CREDENTIALS: ${{ env.HOME }}/secrets/gcloud-service-key.json
5959

6060

6161
# Remove the label so that it can be added again to re-trigger a build

.github/workflows/system-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
GCLOUD_KEY_PASSPHRASE: ${{ secrets.GCLOUD_KEY_PASSPHRASE }}
5151

5252
- name: run tests
53-
run: python -m pytest ./ibis_bigquery/tests/system --save-dataset
53+
run: GOOGLE_APPLICATION_CREDENTIALS="$HOME/secrets/gcloud-service-key.json" python -m pytest ./ibis_bigquery/tests/system --save-dataset
5454
env:
5555
GOOGLE_BIGQUERY_PROJECT_ID: ibis-gbq
56-
GOOGLE_APPLICATION_CREDENTIALS: ${{ env.HOME }}/secrets/gcloud-service-key.json

tests/system/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def default_credentials():
4747
credentials, project_id = google.auth.default(
4848
scopes=ibis_bigquery.EXTERNAL_DATA_SCOPES
4949
)
50-
except google.auth.excecptions.DefaultCredentialsError as exc:
50+
except google.auth.exceptions.DefaultCredentialsError as exc:
5151
pytest.skip(f"Could not get GCP credentials: {exc}")
5252

5353
return credentials, project_id

0 commit comments

Comments
 (0)