Skip to content

Commit

Permalink
Merge pull request #41 from scala/tests-n-updates
Browse files Browse the repository at this point in the history
Add cross platform tests and rework changelog
  • Loading branch information
adpi2 authored May 14, 2024
2 parents f83970c + 9d702d4 commit 2a054ef
Show file tree
Hide file tree
Showing 48 changed files with 791 additions and 491 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ jobs:
- name: Setup Scala CLI
uses: VirtusLab/scala-cli-setup@main

- name: Test changelog and dependency tree semver compliance
run: |
scala-cli checks -- --module-name toolkit --file Toolkit.scala --skip js
scala-cli checks -- --module-name toolkit --file Toolkit.js.scala --skip jvm --skip native
scala-cli checks -- --module-name toolkit-test --file ToolkitTest.scala --module-dep toolkit
- name: Test changelog compliance
run: scala-cli changelog

- name: Import GPG key
id: import_gpg
Expand Down Expand Up @@ -99,4 +96,4 @@ jobs:
continue-on-error: true
env:
TOOLKIT_VERSION: ${{ github.ref_name }}
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }}
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }}
19 changes: 10 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,27 @@ jobs:
- name: Setup Scala CLI
uses: VirtusLab/scala-cli-setup@main

- name: Test changelog and dependency tree semver compliance
run: |
scala-cli checks -- --module-name toolkit --file Toolkit.scala --skip js
scala-cli checks -- --module-name toolkit --file Toolkit.js.scala --skip jvm --skip native
scala-cli checks -- --module-name toolkit-test --file ToolkitTest.scala --module-dep toolkit
- name: Run changelog tests
run: scala-cli test changelog

- name: Check changelog compliance
run: scala-cli changelog

- name: Run cross-platform tests
run: scala-cli test tests/CrossPlatform.test.scala

- name: Run test examples
- name: Compile and run examples
run: |
cd examples
for file in *.sc
do
scala-cli "$file"
done
- name: Run examples of tests
- name: Compile and test examples
run: |
cd examples
for file in *.test.scala
do
scala-cli test "$file"
done
- name: Run checks tests
run: scala-cli test checks
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"moduleName":"toolkit-test","directChanges":[{"$type":"DepUpdated","oldDep":{"id":"org.scala-lang:toolkit_2.13","version":{"major":0,"minor":2,"patch":1},"deps":[{"id":"com.lihaoyi:os-lib_2.13","version":{"major":0,"minor":9,"patch":1},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]},{"id":"com.lihaoyi:upickle_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:ujson_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upack_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upickle-implicits_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]}]},{"id":"com.softwaremill.sttp.client4:core_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":7,"patch":2},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]},{"id":"com.softwaremill.sttp.shared:ws_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":6,"patch":0},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]}]}]},{"id":"com.softwaremill.sttp.client4:upickle_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.lihaoyi:upickle_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:ujson_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upack_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upickle-implicits_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]}]},{"id":"com.softwaremill.sttp.client4:core_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":7,"patch":2},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]},{"id":"com.softwaremill.sttp.shared:ws_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":6,"patch":0},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]}]}]},{"id":"com.softwaremill.sttp.client4:json-common_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.client4:core_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":7,"patch":2},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]},{"id":"com.softwaremill.sttp.shared:ws_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":6,"patch":0},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]}]}]}]}]}]},"newDep":{"id":"org.scala-lang:toolkit_2.13","version":{"major":0,"minor":2,"patch":2},"deps":[{"id":"com.lihaoyi:os-lib_2.13","version":{"major":0,"minor":9,"patch":1},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]},{"id":"com.lihaoyi:upickle_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:ujson_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upack_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upickle-implicits_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]}]},{"id":"com.softwaremill.sttp.client4:core_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":7,"patch":2},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]},{"id":"com.softwaremill.sttp.shared:ws_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":6,"patch":0},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]}]}]},{"id":"com.softwaremill.sttp.client4:upickle_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.lihaoyi:upickle_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:ujson_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upack_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upickle-implicits_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]}]},{"id":"com.softwaremill.sttp.client4:core_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":7,"patch":2},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]},{"id":"com.softwaremill.sttp.shared:ws_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":6,"patch":0},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]}]}]},{"id":"com.softwaremill.sttp.client4:json-common_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.client4:core_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":7,"patch":2},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]},{"id":"com.softwaremill.sttp.shared:ws_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":6,"patch":0},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]}]}]}]}]}]},"under":[{"id":"org.scala-lang:toolkit-test_2.13","version":{"major":0,"minor":2,"patch":2},"deps":[{"id":"org.scala-lang:toolkit_2.13","version":{"major":0,"minor":2,"patch":2},"deps":[{"id":"com.lihaoyi:os-lib_2.13","version":{"major":0,"minor":9,"patch":1},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]},{"id":"com.lihaoyi:upickle_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:ujson_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upack_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upickle-implicits_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]}]},{"id":"com.softwaremill.sttp.client4:core_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":7,"patch":2},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]},{"id":"com.softwaremill.sttp.shared:ws_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":6,"patch":0},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]}]}]},{"id":"com.softwaremill.sttp.client4:upickle_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.lihaoyi:upickle_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:ujson_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upack_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]},{"id":"com.lihaoyi:upickle-implicits_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:upickle-core_2.13","version":{"major":3,"minor":1,"patch":3},"deps":[{"id":"com.lihaoyi:geny_2.13","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]}]},{"id":"com.softwaremill.sttp.client4:core_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":7,"patch":2},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]},{"id":"com.softwaremill.sttp.shared:ws_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":6,"patch":0},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]}]}]},{"id":"com.softwaremill.sttp.client4:json-common_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.client4:core_2.13","version":{"major":4,"minor":0,"patch":0,"suffix":["M6"]},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":7,"patch":2},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]},{"id":"com.softwaremill.sttp.shared:ws_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[{"id":"com.softwaremill.sttp.model:core_2.13","version":{"major":1,"minor":6,"patch":0},"deps":[]},{"id":"com.softwaremill.sttp.shared:core_2.13","version":{"major":1,"minor":3,"patch":16},"deps":[]}]}]}]}]}]},{"id":"org.scalameta:munit_2.13","version":{"major":1,"minor":0,"patch":0,"suffix":["M10"]},"deps":[{"id":"junit:junit","version":{"major":4,"minor":13,"patch":2},"deps":[{"id":"org.hamcrest:hamcrest-core","version":{"major":1,"minor":3,"patch":0},"deps":[]}]},{"id":"org.scalameta:junit-interface","version":{"major":1,"minor":0,"patch":0,"suffix":["M10"]},"deps":[{"id":"junit:junit","version":{"major":4,"minor":13,"patch":2},"deps":[{"id":"org.hamcrest:hamcrest-core","version":{"major":1,"minor":3,"patch":0},"deps":[]}]},{"id":"org.scala-sbt:test-interface","version":{"major":1,"minor":0,"patch":0},"deps":[]}]}]}]}]}],"indirectChanges":[]}
Loading

0 comments on commit 2a054ef

Please sign in to comment.