Skip to content

Commit

Permalink
[test]
Browse files Browse the repository at this point in the history
  • Loading branch information
webdev778 committed Mar 7, 2024
1 parent 83576a0 commit 425437a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -57,6 +58,7 @@ $ pytest

[source,shell]
---
$ pip install regex pytest
$ ./build.sh
$ python -m build
---
Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 425437a

Please sign in to comment.