-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python 3.8 backport and minor code cleanup (#1)
* Backport to Python 3.8 Only requires adding a few `from __future__ import annotations` Signed-off-by: Bolun Thompson <[email protected]> * Add runnable tests Signed-off-by: Bolun Thompson <[email protected]> * Add github action for tests Signed-off-by: Bolun Thompson <[email protected]> * Update submodule to use pash libbash Signed-off-by: Bolun Thompson <[email protected]> * Fix simple type-hint errors Signed-off-by: Bolun Thompson <[email protected]> * Format with black Signed-off-by: Bolun Thompson <[email protected]> * Remove editable --------- Signed-off-by: Bolun Thompson <[email protected]>
- Loading branch information
1 parent
3cfd4f0
commit 5f79dea
Showing
14 changed files
with
473 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Test | ||
on: | ||
pull_request_target: | ||
types: [assigned, opened, synchronize, reopened, ready_for_review] | ||
paths: | ||
- libbash/** | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- libbash/** | ||
jobs: | ||
LibBash-Test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Running Tests | ||
run: | | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
./setup_test.sh | ||
./test.py | tee python.log | ||
test_succ=$? | ||
# TODO: Is this working? | ||
timer="$(LANG=en_us_88591; date)" | ||
echo "VERSION<<EOF" >> "$GITHUB_ENV" | ||
echo "OS:${{matrix.os}}" >> "$GITHUB_ENV" | ||
echo "$timer" >> "$GITHUB_ENV" | ||
cat python.log >> "$GITHUB_ENV" | ||
echo 'EOF' >> "$GITHUB_ENV" | ||
exit $test_succ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "bash-5.2"] | ||
path = libbash/bash-5.2 | ||
url = https://github.com/sethsabar/bash-for-libbash.git | ||
url = https://github.com/binpash/bash-for-libbash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
from .api import ast_to_json, bash_to_ast, ast_to_bash | ||
from .test import run_tests | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule bash-5.2
updated
from c8f14b to 9a8849
Oops, something went wrong.