Skip to content

Commit

Permalink
Added monthly_tests marker and .yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
charlottekostelic committed Nov 5, 2024
1 parent 611579d commit 00153a0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/monthly-api-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: monthly API response check
on:
push:
branches:
- monthly-api-checks
schedule:
- cron: '5 9 15 * *'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
WCKEY: ${{ secrets.WC_KEY }}
WCSECRET: ${{ secrets.WC_SECRET }}
WCSCOPES: "WorldCatMetadataAPI"
jobs:
monthly-run:
name: Run monthly API response check
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version}}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version}}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r dev-requirements.txt
- name: Run monthly live tests
run: |
pytest -m "monthly_check"
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ markers = [
"webtest: mark a test hitting live endpoints",
"holdings: mark holdings live endpoint tests",
"http_code: use to pass returned http code to 'mock_session_response' fixture that mocks 'requests.Session.send' method",
"monthly_check: mark a test that should be run with monthly API response check",
]

[tool.coverage.run]
Expand Down

0 comments on commit 00153a0

Please sign in to comment.