From 19932cb657f07391ab3f28b951fbbe8d3cef9280 Mon Sep 17 00:00:00 2001 From: Felix Alm Date: Mon, 5 Aug 2024 15:59:29 +0100 Subject: [PATCH 1/4] Migrate test-clj job to GitHub Actions --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..918166d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test-clj: + runs-on: ubuntu-latest + container: + image: cimg/clojure:1.11.1-browsers + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Check cache + uses: actions/cache/restore@v4 + id: cache + with: + path: | + ~/.m2/repository + ~/.lein + key: clj-deps-${{ hashFiles('project.clj') }} + + - run: lein deps + - run: lein eastwood + - run: lein cljfmt check + - run: lein test + + - name: Save cache + uses: actions/cache/save@v4 + with: + path: | + ~/.m2/repository + ~/.lein + key: clj-deps-${{ hashFiles('project.clj') }} + + # test-cljs: + # coverage: + build: + needs: [test-clj] + runs-on: ubuntu-latest + steps: + - run: echo 'Successfully ran all jobs' From 42a1b0e33169502ce50c859df3860cf3be851f62 Mon Sep 17 00:00:00 2001 From: Felix Alm Date: Mon, 5 Aug 2024 16:09:58 +0100 Subject: [PATCH 2/4] Migrate test-cljs job to Github Actions --- .github/workflows/ci.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 918166d..55485ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,10 +40,14 @@ jobs: ~/.lein key: clj-deps-${{ hashFiles('project.clj') }} - # test-cljs: - # coverage: - build: - needs: [test-clj] + test-cljs: runs-on: ubuntu-latest + container: + image: cimg/clojure:1.11.1-browsers + steps: - - run: echo 'Successfully ran all jobs' + - name: Checkout code + uses: actions/checkout@v2 + + - run: sudo npm install -g --unsafe-perm lumo-cljs + - run: ./lumo-test From 58e14dcf1189ed2f702dcd56eaa8b2f9ca138e18 Mon Sep 17 00:00:00 2001 From: Felix Alm Date: Mon, 5 Aug 2024 16:14:41 +0100 Subject: [PATCH 3/4] Remove CircleCI config --- .circleci/config.yml | 67 -------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index a6c0bf7..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,67 +0,0 @@ -version: 2 - -jobs: - test-clj: - docker: - - image: circleci/clojure:lein-2.8.1 - - # this is needed because inside the docker container $TERM - # is not defined - environment: - - TERM: dumb - - steps: - - checkout - - restore_cache: - keys: - - clj-deps-{{ checksum "project.clj" }} - - - run: lein deps - - run: lein eastwood - - run: lein cljfmt check - - run: lein test - - save_cache: - paths: - - ~/.m2/repository - - ~/.lein - - key: clj-deps-{{ checksum "project.clj" }} - - coverage: - docker: - - image: circleci/clojure:lein-2.8.1 - - environment: - - TERM: dumb - - steps: - - checkout - - restore_cache: - keys: - - clj-deps-{{ checksum "project.clj" }} - - - run: lein cloverage --codecov - - store_test_results: - path: target/test-results - - - store_artifacts: - path: target/coverage - - - run: bash <(curl -s https://codecov.io/bash) - - test-cljs: - docker: - - image: circleci/node:latest - - steps: - - checkout - - run: sudo npm install -g --unsafe-perm lumo-cljs - - run: ./lumo-test - -workflows: - version: 2 - test: - jobs: - - test-clj - - test-cljs - - coverage From 24d08a2b0e93c3fb5ce6e1fc224e0f073dcd8690 Mon Sep 17 00:00:00 2001 From: Felix Alm Date: Mon, 5 Aug 2024 16:15:34 +0100 Subject: [PATCH 4/4] Rename GH Action to Tests --- .github/workflows/{ci.yml => tests.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{ci.yml => tests.yml} (98%) diff --git a/.github/workflows/ci.yml b/.github/workflows/tests.yml similarity index 98% rename from .github/workflows/ci.yml rename to .github/workflows/tests.yml index 55485ae..f725a8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: CI +name: Tests on: push: