diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 01f25a1..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,39 +0,0 @@ -version: 2 - -jobs: - build: - docker: - - image: circleci/clojure:openjdk-8-lein-2.9.1-node-browsers-legacy - user: circleci - environment: - JVM_OPTS: -Xms1g -Xmx1g - working_directory: ~/repo - steps: - - checkout - - restore_cache: - keys: - - v2-dependencies-{{ checksum "project.clj" }} - - v2-dependencies- - - run: - name: Fetch dependencies - command: lein deps - - run: - name: Install karma dependencies - command: yarn add karma karma-cljs-test karma-chrome-launcher --dev - - run: - name: Install karma-cli - command: sudo yarn global add karma-cli - - save_cache: - key: v2-dependencies-{{ checksum "project.clj" }} - paths: - - ~/.m2 - - ~/repo/node_modules - - run: - name: Test - command: make test - -workflows: - version: 2 - build_and_test: - jobs: - - build diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml new file mode 100644 index 0000000..c68bfe9 --- /dev/null +++ b/.github/workflows/lint-and-test.yml @@ -0,0 +1,68 @@ +name: Lint and Test + +on: push + +jobs: + clj_style: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeLaGuardo/setup-clojure@master + with: + cljstyle: latest + - run: cljstyle check --report -v + + clj_kondo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeLaGuardo/setup-clojure@master + with: + clj-kondo: latest + - run: clj-kondo --lint src:test:integration + + test: + needs: [clj_style, clj_kondo] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '11' + java-package: jdk + architecture: x64 + + - uses: DeLaGuardo/setup-clojure@master + with: + lein: '2.11.2' + + - uses: actions/setup-node@v3 + with: + node-version: '18.16.1' + cache: 'yarn' + cache-dependency-path: yarn.lock + + + - name: Show versions + run: | + java -version + lein version + yarn -v + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: | + ~/.m2 + ~/.lein + key: clj-cache-test-${{ hashFiles('project.clj') }} + restore-keys: | + clj-cache-test- + + - run: yarn install + + - name: Run tests + run: make test