diff --git a/.circleci/config.yml b/.circleci/config.yml index 8b13789..9522e8d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1 +1,50 @@ +version: 2.0 +setup-maven-distributions: &setup-maven-distributions + run: + name: Setup distrubution servers for larky + command: | + mkdir -p ~/.m2 + cat < ~/.m2/settings.xml + + + + github + $GITHUB_USERNAME + $GITHUB_API_TOKEN + + + + EOF + echo $GITHUB_USERNAME +jobs: + test-larky: + docker: + - image: maven:3.8.6-openjdk-11 + steps: + - checkout + - <<: *setup-maven-distributions + - run: + name: Clone starlarky + command: | + git clone git@github.com:verygoodsecurity/starlarky.git ./tmp/starlarky + - run: + name: Remove default quick_tests + command: | + rm -f ./tmp/starlarky/larky/src/test/resources/quick_tests/**.star + - run: + name: Copy code example tests to quick_tests folder + command: | + cp $(find ./integrations/larky/ | grep .star) ./tmp/starlarky/larky/src/test/resources/quick_tests/ + - run: + name: Test Larky + command: | + cd ./tmp/starlarky + mvn -Dtest='LarkyQuickTests*' test -pl larky + +workflows: + version: 2 + + test-larky: + jobs: + - test-larky diff --git a/.gitignore b/.gitignore index 957f9be..9e0b216 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ **/node_modules **/results.txt content-by-language/node/package*.json +tmp/* \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ce05fdd --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +.PHONY: test-larky + +./tmp/starlarky: + git clone git@github.com:verygoodsecurity/starlarky.git ./tmp/starlarky + +test-larky: ./tmp/starlarky + rm -f tmp/starlarky/larky/src/test/resources/quick_tests/**.star + cp $$(find ./integrations/larky/ | grep .star) ./tmp/starlarky/larky/src/test/resources/quick_tests/ + cd ./tmp/starlarky; mvnw -Dtest='LarkyQuickTests*' test -pl larky