diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b70ec8a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: PyTest + +on: + push: + branches: + - main + - "*/ci-check" + pull_request: {} + +jobs: + test: + name: PyTest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + python: [3.8, "3.10", 3.11, 3.12] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: interscript/interscript + - name: Run bootstrap script + run: ruby bootstrap.rb + - name: Use Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.2" + - name: Use Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + - name: Compile maps + run: cd python; pip install regex pytest; bash ./build.sh; pip install . + - name: PyTest + run: cd python; pytest diff --git a/README.adoc b/README.adoc index 70444fb..0539266 100644 --- a/README.adoc +++ b/README.adoc @@ -48,6 +48,7 @@ Interscript implementation. Those maps are compiled to respective `.py` files in [source,shell] --- +$ pip install regex pytest $ ./build.sh $ pip install -e . $ pytest @@ -57,6 +58,7 @@ $ pytest [source,shell] --- +$ pip install regex pytest $ ./build.sh $ python -m build --- diff --git a/build.sh b/build.sh index 16db1c7..f066bc9 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash rm -rf src/interscript/maps mkdir -p src/interscript/maps pushd ../ruby +bundle config set --local without 'secryst' bundle install || exit 1 bundle exec rake compile[python,../python/src/interscript/maps] || exit 1 popd