From 4c1c8654cffd10872a4a19c9589807e5bae2333c Mon Sep 17 00:00:00 2001 From: Travis Mottershead Date: Sun, 11 Sep 2022 20:20:08 -0600 Subject: [PATCH 1/2] Added config for running larky tests. --- .circleci/config.yml | 15 +++++++++++++++ .gitignore | 1 + Makefile | 9 +++++++++ 3 files changed, 25 insertions(+) create mode 100644 Makefile diff --git a/.circleci/config.yml b/.circleci/config.yml index 8b13789..02d0c4a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1 +1,16 @@ +version: 2.0 +jobs: + test-larky: + docker: + - image: cimg/openjdk:17.0.1 + steps: + - checkout + - run: make test-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 From e6249c4953d36aa20cca70940a3fb6d35a248c67 Mon Sep 17 00:00:00 2001 From: Travis Mottershead Date: Sun, 11 Sep 2022 20:36:24 -0600 Subject: [PATCH 2/2] Updated circleci. --- .circleci/config.yml | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 02d0c4a..9522e8d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,12 +1,46 @@ 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: cimg/openjdk:17.0.1 + - image: maven:3.8.6-openjdk-11 steps: - checkout - - run: make test-larky + - <<: *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