From 48fa81dd7f7579168fddb63a407e18cc02abec58 Mon Sep 17 00:00:00 2001 From: erp12 Date: Mon, 13 Sep 2021 22:31:11 -0400 Subject: [PATCH] Fixes CI and fixes tests on Java 16 --- .github/workflows/ci.yml | 8 ++++---- test/erp12/fijit/alpha/reflect_test.clj | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7eb8861..19fbd15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: Clojure CI -on: [push, pull_request] +on: [push] jobs: build: @@ -10,11 +10,11 @@ jobs: java: [ '8', '16' ] steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - name: Prepare Java + uses: actions/setup-java@v2 with: - distribution: 'adopt' + distribution: 'temurin' java-version: ${{ matrix.java }} - cache: 'maven' - name: Clojure CLI uses: DeLaGuardo/setup-clojure@master with: diff --git a/test/erp12/fijit/alpha/reflect_test.clj b/test/erp12/fijit/alpha/reflect_test.clj index 78cb8d3..3abe02a 100644 --- a/test/erp12/fijit/alpha/reflect_test.clj +++ b/test/erp12/fijit/alpha/reflect_test.clj @@ -3,7 +3,8 @@ [expectations.clojure.test :refer :all] [erp12.fijit.alpha.reflect :as r] [erp12.fijit.collection :as sc] - [erp12.fijit.version :as ver]) + [erp12.fijit.version :as ver] + [clojure.set :as set]) (:import (java.time LocalDate) (scala.collection.immutable Map Seq List) (scala.reflect ClassTag))) @@ -24,8 +25,8 @@ (expect "scala.collection.immutable.Map[java.lang.String,scala.collection.immutable.Seq[java.lang.Integer]]" (r/full-type-pr string->ints))) (testing "querying type" (testing "bases" - (expect '("class String" "trait CharSequence" "trait Comparable" "trait Serializable" "class Object" "class Any") - (map str (r/base-classes string))) + (is (set/subset? #{"class String" "trait CharSequence" "trait Comparable" "trait Serializable" "class Object" "class Any"} + (set (map str (r/base-classes string))))) (expect (ver/by-scala-version :2.12 '("class Option" "trait Serializable" "trait Serializable" "trait Product" "trait Equals" "class Object" "class Any") :2.13 '("class Option" "trait Serializable" "trait Product" "trait Equals" "trait IterableOnce" "class Object" "class Any")) (map str (r/base-classes option-long))))