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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..f725a8e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,53 @@ +name: Tests + +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: + runs-on: ubuntu-latest + container: + image: cimg/clojure:1.11.1-browsers + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - run: sudo npm install -g --unsafe-perm lumo-cljs + - run: ./lumo-test