Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use a local httpbin instance for tests #167

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/_unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,22 @@ jobs:
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}

env:
HTTPBIN_URL: http://127.0.0.1:8080/

steps:
# We need to check out the head commit in case of PRs, and the default ref otherwise (during release).
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: "${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '' }}"

- name: Run a httpbin in the background
uses: addnab/docker-run-action@v3
with:
image: kennethreitz/httpbin
options: -d -p 8080:80

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
Loading