forked from clojure/clojurescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLJS-3262: Add self-parity tests to GitHub actions
- Loading branch information
Showing
6 changed files
with
98 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,43 @@ jobs: | |
- name: Run tests | ||
run: node builds/out-self/core-self-test.js | ||
|
||
# Self-parity Tests | ||
self-parity-test: | ||
name: Self-parity Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: DeLaGuardo/[email protected] | ||
with: | ||
tools-deps: '1.10.1.536' | ||
|
||
- name: Cache maven | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-maven | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/deps.edn') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}- | ||
- name: Cache gitlibs | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-gitlibs | ||
with: | ||
path: ~/.gitlibs | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/deps.edn') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}- | ||
- name: Build tests | ||
run: clojure -A:selfparity.test.build | ||
|
||
- name: Run tests | ||
run: node builds/out-self-parity/main.js | ||
|
||
# Compiler Tests | ||
compiler-test: | ||
name: Compiler Tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{:optimizations :none | ||
:main self-parity.test | ||
:output-to "builds/out-self-parity/main.js" | ||
:output-dir "builds/out-self-parity" | ||
:cache-analysis-format :edn | ||
:target :nodejs} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
;; Copyright (c) Rich Hickey. All rights reserved. | ||
;; The use and distribution terms for this software are covered by the | ||
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) | ||
;; which can be found in the file epl-v10.html at the root of this distribution. | ||
;; By using this software in any fashion, you are agreeing to be bound by | ||
;; the terms of this license. | ||
;; You must not remove this notice, or any other, from this software. | ||
|
||
(ns self-parity.setup | ||
^{:doc "Sets up the filesystem, priming the output directory | ||
with needed source files so that the self-hosted compiler | ||
being executed within Node has various dependency sources | ||
available (without the benefit of being able to load resources | ||
from a classpath)."} | ||
(:require | ||
[clojure.java.io :as io])) | ||
|
||
(def out-path (io/file "builds" "out-self-parity")) | ||
|
||
(defn copy-source | ||
[source-resource-name] | ||
(let [target-file (io/file out-path source-resource-name)] | ||
(io/make-parents target-file) | ||
(io/copy (io/input-stream (io/resource source-resource-name)) target-file))) | ||
|
||
(def test-check-source-resource-names | ||
["clojure/test/check.cljc" | ||
"clojure/test/check/random.clj" | ||
"clojure/test/check/random.cljs" | ||
"clojure/test/check/rose_tree.cljc" | ||
"clojure/test/check/clojure_test.cljc" | ||
"clojure/test/check/clojure_test/assertions.cljc" | ||
"clojure/test/check/clojure_test/assertions/cljs.cljc" | ||
"clojure/test/check/results.cljc" | ||
"clojure/test/check/impl.cljc" | ||
"clojure/test/check/properties.cljc" | ||
"clojure/test/check/random/longs.cljs" | ||
"clojure/test/check/random/doubles.cljs" | ||
"clojure/test/check/random/longs/bit_count_impl.cljs" | ||
"clojure/test/check/generators.cljc"]) | ||
|
||
(def source-resource-names | ||
(into ["clojure/template.clj"] | ||
test-check-source-resource-names)) | ||
|
||
(defn -main [] | ||
(run! copy-source source-resource-names)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters