Skip to content

Commit b03d493

Browse files
committed
ci: skip tests that hit github api on mac
1 parent 79764ba commit b03d493

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: ["macos-latest", "ubuntu-latest"]
18+
include:
19+
- os: "macos-latest"
20+
# ignore doctests, as they involve calls to github, and all mac machines
21+
# use the same IP address
22+
pytest_opts: "-k pins/tests"
23+
- os: "ubuntu-latest"
24+
pytest_opts:
1925
steps:
2026
- uses: actions/checkout@v2
2127
- uses: actions/setup-python@v2
@@ -28,12 +34,12 @@ jobs:
2834
python -m pip install -e .
2935
- name: Run tests
3036
run: |
31-
pytest pins -m 'not fs_rsc and not skip_on_github'
37+
pytest pins -m 'not fs_rsc and not skip_on_github' $PYTEST_OPTS
3238
env:
3339
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
3440
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
3541
AWS_REGION: "us-east-1"
36-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
42+
PYTEST_OPTS: ${{ matrix.pytest_opts}}
3743

3844
test-rsconnect:
3945
name: "Test RSConnect"

pins/boards.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -569,13 +569,7 @@ class BoardManual(BaseBoard):
569569
--------
570570
>>> import fsspec
571571
>>> import os
572-
>>> fs = fsspec.filesystem(
573-
... "github",
574-
... org = "machow",
575-
... repo = "pins-python",
576-
... token=os.environ.get("GITHUB_TOKEN") # optional
577-
... )
578-
572+
>>> fs = fsspec.filesystem("github", org = "machow", repo = "pins-python")
579573
>>> pin_paths = {"df_csv": "df_csv/20220214T163720Z-9bfad"}
580574
>>> board = BoardManual("pins/tests/pins-compat", fs, pin_paths=pin_paths)
581575

pins/constructors.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ def board_github(
182182
--------
183183
184184
>>> import os
185-
>>> gh_token = os.environ.get("GITHUB_TOKEN")
186-
>>> board = board_github("machow", "pins-python", "pins/tests/pins-compat", gh_token)
185+
>>> board = board_github("machow", "pins-python", "pins/tests/pins-compat")
187186
>>> board.pin_list()
188187
['df_arrow', 'df_csv', 'df_rds', 'df_unversioned']
189188

0 commit comments

Comments
 (0)