Skip to content

Commit

Permalink
Merge pull request #3 from karlll/dev
Browse files Browse the repository at this point in the history
Setup GH workflow
  • Loading branch information
karlll authored Nov 28, 2021
2 parents 39619b1 + b1de34e commit 631ce42
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run tests

on: [ push ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/[email protected]
- name: Build JAR with Gradle
run: ./gradlew jar
- name: Run all tests
run: ./gradlew run-internal-tests run-mal-regression-tests
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.idea
.idea/
build
.gradle
.gradle/
!/gradle/wrapper/gradle-wrapper.jar
.DS_Store
6 changes: 3 additions & 3 deletions bin/krisp-repl.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

java -jar "${SCRIPT_DIR}/../build/libs/krisp-0.0.1-SNAPSHOT.jar"
#!/usr/bin/env bash

bin_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
java -jar "${bin_dir}/../build/libs/krisp-0.0.1-SNAPSHOT.jar"
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions src/test/mal/regression-test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
test_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

steps=(step2_eval.mal step3_env.mal step4_if_fn_do.mal step5_tco.mal step6_file.mal step7_quote.mal step8_macros.mal step9_try.mal stepA_mal.mal)

for i in "${steps[@]}"
do
"${SCRIPT_DIR}"/runtest.py --rundir "${SCRIPT_DIR}" --hard --deferrable --optional "$i" -- sh "${SCRIPT_DIR}"/../../../bin/krisp-repl.sh
"${test_dir}"/runtest.py --rundir "${test_dir}" --hard --deferrable --optional "$i" -- bash "${test_dir}"/../../../bin/krisp-repl.sh
done

0 comments on commit 631ce42

Please sign in to comment.