Skip to content

Commit

Permalink
Try to make tests work in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
shiro committed Nov 21, 2023
1 parent 26e9c43 commit bda87d5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
python-version: 3.9
architecture: x64

- uses: dtolnay/rust-toolchain@nightly
- name: Setup test dependencies
run: sudo apt-get install -y libxkbcommon-dev && python -m venv .env && source .env/bin/activate && pip install maturin
- name: Test
run: source .env/bin/activate && ./test.sh

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand All @@ -43,8 +49,6 @@ jobs:
sccache: 'true'
manylinux: auto
before-script-linux: "./ci/prepare-ci.sh"
- name: foo
run: ls -la dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ edition = "2018"

[features]
integration = []
extension-module = ["pyo3/extension-module"]
default = ["extension-module"]

[lib]
name = "map2"
Expand Down Expand Up @@ -36,8 +38,7 @@ xdg = "2.2.0"
atty = "0.2"
indoc = "1.0"
futures-intrusive = "0.4.0"
#pyo3 = { version = "0.20.0", extension-module = ["extension-module"], default = ["extension-module"] }
pyo3 = { version = "0.20.0", features = ["extension-module"] }
pyo3 = { version = "0.20.0" }
pyo3-asyncio = { version = "0.20.0", features = ["attributes", "tokio-runtime", "testing"] }
oneshot = "0.1.2"
signal-hook = "0.3.17"
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import map2
import time

map2.default(layout = "rabbit")
map2.default()

writer = map2.Writer(capabilities = {"rel": True, "buttons": True})

Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -e

cargo test --features integration
cargo test --no-default-features --features integration

0 comments on commit bda87d5

Please sign in to comment.