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 754b96a
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
test:
name: Release
runs-on: ubuntu-latest
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: "3.12"
- name: Compile maps
run: cd python; pip install build regex pytest twine; bash ./build.sh; pip install .
- name: PyTest
run: cd python; pytest
- name: Build package
run: cd python; python -m build
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: python/dist/
permissions:
id-token: write
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 jsexec'
bundle install || exit 1
bundle exec rake compile[python,../python/src/interscript/maps] || exit 1
popd
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "interscript"
version = "0.0.1"
version = "0.0.4"
authors = [
{ name="Ribose Inc.", email="[email protected]" },
]
Expand Down

0 comments on commit 754b96a

Please sign in to comment.