Skip to content

Commit

Permalink
Refine ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Oct 16, 2024
1 parent 503aa91 commit d949cb1
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 41 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: develop

on:
pull_request:
push:

jobs:
develop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Test
run: |
python -m pip install --editable .
python ./test/test_examples.py
python ./test/test_spec.py
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Of course there are some more complicated examples!
# Test

```sh
$ python3 ./test/test_spec.py
$ python ./test/test_spec.py
```

Tested in the following environments:
Expand Down
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "pywasm"
version = "1.0.8"
authors = [
{ name="Mohanson", email="[email protected]" },
]
description = "WebAssembly Interpreter by pure Python"
readme = "README.md"
license = { file = "LICENSE" }
dependencies = ["numpy"]

[project.urls]
homepage = "https://github.com/mohanson/pywasm"
1 change: 0 additions & 1 deletion script/update_testsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import shutil
import subprocess
import sys
import tempfile

wabt = 'https://github.com/WebAssembly/wabt'
testsuite = 'https://github.com/WebAssembly/testsuite'
Expand Down
22 changes: 0 additions & 22 deletions setup.py

This file was deleted.

17 changes: 6 additions & 11 deletions test/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import shutil
import subprocess

if shutil.which('py'):
py = 'py'
else:
py = 'python'

def test_examples():
assert subprocess.getoutput(f'{py} examples/add.py') == '9'
assert subprocess.getoutput(f'{py} examples/cycle.py') == '4'
assert subprocess.getoutput(f'{py} examples/env.py') == '55'
assert subprocess.getoutput(f'{py} examples/fib.py') == '55'
assert subprocess.getoutput(f'{py} examples/str.py') == 'Hello World!'
assert subprocess.getoutput(f'{py} examples/sum.py') == '4950'
assert subprocess.getoutput(f'python examples/add.py') == '9'
assert subprocess.getoutput(f'python examples/cycle.py') == '4'
assert subprocess.getoutput(f'python examples/env.py') == '55'
assert subprocess.getoutput(f'python examples/fib.py') == '55'
assert subprocess.getoutput(f'python examples/str.py') == 'Hello World!'
assert subprocess.getoutput(f'python examples/sum.py') == '4950'


if __name__ == '__main__':
Expand Down

0 comments on commit d949cb1

Please sign in to comment.