6 Commits
2.3.1 ... 2.3.3

Author SHA1 Message Date
Tyler Akins
54195a6c6e Fixing test script to return 0 on success 2021-11-25 16:02:21 -06:00
Tyler Akins
81f9ec326d Leaning away from committing package.json
Thank you yutachaos!
2021-11-25 15:59:30 -06:00
Tyler Akins
dae1c66f8f Merge branch 'feature/added_github_action' of https://github.com/yutachaos/mo into yutachaos-feature/added_github_action 2021-11-25 15:57:52 -06:00
Tyler Akins
08576fca7b Adding script to run against official specs 2021-11-25 15:40:13 -06:00
Tyler Akins
3aa5c462f8 Quoting variable
This suggestion is brought to you by neema80 - thank you!

This closes #48.
2021-11-25 15:36:47 -06:00
yutachaos
a28ed0ccd5 Added docker image push action 2021-04-23 13:01:42 +09:00
6 changed files with 39 additions and 12 deletions

13
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: CI
on: [push]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Run tests
run: ./run-tests
- name: Run against spec
run: ./run-spec

2
.gitignore vendored
View File

@@ -5,3 +5,5 @@ tests/*.diff
spec/ spec/
spec-runner/ spec-runner/
node_modules/ node_modules/
package.json
package-lock.json

2
mo
View File

@@ -302,7 +302,7 @@ moFindEndTag() {
moFindString() { moFindString() {
local pos string local pos string
string=${2%%$3*} string=${2%%"$3"*}
[[ "$string" == "$2" ]] && pos=-1 || pos=${#string} [[ "$string" == "$2" ]] && pos=-1 || pos=${#string}
local "$1" && moIndirect "$1" "$pos" local "$1" && moIndirect "$1" "$pos"
} }

View File

@@ -1,10 +0,0 @@
{
"dependencies": {
"async": "*"
},
"scripts": {
"clean": "rm -rf package-lock.json node_modules/ spec/",
"install-tests": "npm install; git clone https://github.com/mustache/spec.git spec",
"test": "node run-spec.js spec/specs/*.json"
}
}

20
run-spec Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Create a package.json so the dependency package is installed in the local
# directory
echo '{"private":true, "dependencies":{"async": "*"}}' > package.json
npm install
# Install or update the specs
if [[ ! -d spec ]]; then
git clone https://github.com/mustache/spec.git spec
else
(
cd spec;
git pull
)
fi
# Actually run the specs
node run-spec.js spec/specs/*.json

View File

@@ -40,4 +40,6 @@ done
echo "" echo ""
echo "Pass: $PASS" echo "Pass: $PASS"
echo "Fail: $FAIL" echo "Fail: $FAIL"
[[ $FAIL -gt 0 ]] && exit 1 if [[ $FAIL -gt 0 ]]; then
exit 1
fi