Skip to content

Commit

Permalink
test(static): attempt to fix static route tests on Windows+py313
Browse files Browse the repository at this point in the history
  • Loading branch information
vytas7 committed Sep 28, 2024
1 parent 0278f0a commit bb5a25f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 33 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test-mailman.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Run tests (GNU Mailman 3)
# Test that the current dev branch does not break GNU Mailman 3.
name: test-mailman

on:
# Trigger the workflow on master but also allow it to run manually.
Expand Down
46 changes: 18 additions & 28 deletions .github/workflows/test-wheels.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Test wheels various architectures by building out binaries with cibuildwheel.
# Test various architectures by building out binaries with cibuildwheel.
name: test-wheels

on:
Expand All @@ -11,38 +11,27 @@ on:
pull_request:
branches:
- master
jobs:
# TODO(vytas): Clean up when ready, just fail this fast on the WiP PR for now.
test-windows:
name: "cibuildwheel: ${{ matrix.platform }}"
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
platform:
- "cp313-win_amd64"

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: all
CIBW_BUILD: ${{ matrix.platform }}

jobs:
test-emulated:
name: "cibuildwheel: ${{ matrix.platform }}"
runs-on: ubuntu-latest
name: "cibuildwheel: ${{ matrix.platform.build }}"
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- "cp312-manylinux_aarch64"
- "cp312-manylinux_s390x"
- build: "cp313-manylinux_aarch64"
os: ubuntu-latest
emulation: true
- build: "cp313-manylinux_s390x"
os: ubuntu-latest
emulation: true
- build: "cp313-musllinux_x86_64"
os: ubuntu-latest
- build: "cp313-macosx_arm64"
os: macos-14
- build: "cp313-win_amd64"
os: windows-latest

steps:
- name: Checkout repo
Expand All @@ -52,11 +41,12 @@ jobs:

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: ${{ matrix.platform.emulation }}
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: all
CIBW_BUILD: ${{ matrix.platform }}
CIBW_BUILD: ${{ matrix.platform.build }}
8 changes: 4 additions & 4 deletions tests/test_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,11 +619,11 @@ def test_file_closed(client, patch_open):
assert patch_open.current_file.closed


def test_options_request(util, asgi, patch_open):
def test_options_request(client, patch_open):
patch_open()
app = util.create_app(asgi, cors_enable=True)
app.add_static_route('/static', '/var/www/statics')
client = testing.TestClient(app)

client.app.add_middleware(falcon.CORSMiddleware())
client.app.add_static_route('/static', '/var/www/statics')

resp = client.simulate_options(
path='/static/foo/bar.txt',
Expand Down

0 comments on commit bb5a25f

Please sign in to comment.