-
-
Notifications
You must be signed in to change notification settings - Fork 564
Add JSDOMNodeJSEnv to ci matrix and fix polyfill #2191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e0f7f54
Add JSDOMNodeJSEnv to ci matrix
armanbilge fcac260
Fix polyfill for JSDomNodeJS environment
armanbilge 2f50af4
Disable Web Worker tests on JSDOMNodeJS
armanbilge 312467e
Update ci alias
armanbilge 5499977
Add package-lock.json and friends
armanbilge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ jobs: | |
| - [email protected] | ||
| - [email protected] | ||
| - [email protected] | ||
| ci: [ciJVM, ciJS, ciFirefox, ciChrome] | ||
| ci: [ciJVM, ciJS, ciFirefox, ciChrome, ciJSDOMNodeJS] | ||
| exclude: | ||
| - ci: ciJS | ||
| java: [email protected] | ||
|
|
@@ -66,6 +66,18 @@ jobs: | |
| scala: 2.12.14 | ||
| - os: windows-latest | ||
| ci: ciChrome | ||
| - ci: ciJSDOMNodeJS | ||
| java: [email protected] | ||
| - ci: ciJSDOMNodeJS | ||
| java: [email protected] | ||
| - ci: ciJSDOMNodeJS | ||
| java: [email protected] | ||
| - os: windows-latest | ||
| scala: 3.0.1 | ||
| - os: windows-latest | ||
| scala: 2.12.14 | ||
| - os: windows-latest | ||
| ci: ciJSDOMNodeJS | ||
| - java: [email protected] | ||
| os: windows-latest | ||
| runs-on: ${{ matrix.os }} | ||
|
|
@@ -98,11 +110,16 @@ jobs: | |
| key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
|
||
| - name: Setup NodeJS v14 LTS | ||
| if: matrix.ci == 'ciJS' | ||
| if: matrix.ci == 'ciJS' || matrix.ci == 'ciJSDOMNodeJS' | ||
| uses: actions/[email protected] | ||
| with: | ||
| node-version: 14 | ||
|
|
||
| - name: Install jsdom | ||
| if: matrix.ci == 'ciJSDOMNodeJS' | ||
| shell: bash | ||
| run: npm install | ||
|
|
||
| - name: Check that workflows are up to date | ||
| shell: bash | ||
| run: sbt ++${{ matrix.scala }} githubWorkflowCheck | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -17,3 +17,6 @@ tags | |
| .bloop/ | ||
| metals.sbt | ||
| .vscode | ||
|
|
||
| # npm | ||
| node_modules/ | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ import org.openqa.selenium.WebDriver | |
| import org.openqa.selenium.chrome.{ChromeDriver, ChromeOptions} | ||
| import org.openqa.selenium.firefox.{FirefoxOptions, FirefoxProfile} | ||
| import org.openqa.selenium.remote.server.{DriverFactory, DriverProvider} | ||
| import org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv | ||
| import org.scalajs.jsenv.selenium.SeleniumJSEnv | ||
|
|
||
| import JSEnv._ | ||
|
|
@@ -66,12 +67,19 @@ val GraalVM8 = "[email protected]" | |
| ThisBuild / githubWorkflowJavaVersions := Seq(ScalaJSJava, LTSJava, LatestJava, GraalVM8) | ||
| ThisBuild / githubWorkflowOSes := Seq(PrimaryOS, Windows) | ||
|
|
||
| ThisBuild / githubWorkflowBuildPreamble += | ||
| ThisBuild / githubWorkflowBuildPreamble ++= Seq( | ||
| WorkflowStep.Use( | ||
| UseRef.Public("actions", "setup-node", "v2.1.2"), | ||
| name = Some("Setup NodeJS v14 LTS"), | ||
| params = Map("node-version" -> "14"), | ||
| cond = Some("matrix.ci == 'ciJS'")) | ||
| cond = Some("matrix.ci == 'ciJS' || matrix.ci == 'ciJSDOMNodeJS'") | ||
| ), | ||
| WorkflowStep.Run( | ||
| List("npm install"), | ||
| name = Some("Install jsdom"), | ||
| cond = Some("matrix.ci == 'ciJSDOMNodeJS'") | ||
| ) | ||
| ) | ||
|
|
||
| ThisBuild / githubWorkflowBuild := Seq( | ||
| WorkflowStep.Sbt(List("${{ matrix.ci }}")), | ||
|
|
@@ -97,7 +105,7 @@ ThisBuild / githubWorkflowBuild := Seq( | |
| ) | ||
| ) | ||
|
|
||
| val ciVariants = List("ciJVM", "ciJS", "ciFirefox", "ciChrome") | ||
| val ciVariants = List("ciJVM", "ciJS", "ciFirefox", "ciChrome", "ciJSDOMNodeJS") | ||
| val jsCiVariants = ciVariants.tail | ||
| ThisBuild / githubWorkflowBuildMatrixAdditions += "ci" -> ciVariants | ||
|
|
||
|
|
@@ -132,6 +140,7 @@ ThisBuild / Test / jsEnv := { | |
|
|
||
| useJSEnv.value match { | ||
| case NodeJS => old | ||
| case JSDOMNodeJS => new JSDOMNodeJSEnv() | ||
| case Firefox => | ||
| val profile = new FirefoxProfile() | ||
| profile.setPreference("privacy.file_unique_origin", false) | ||
|
|
@@ -177,7 +186,7 @@ val CoopVersion = "1.1.1" | |
|
|
||
| replaceCommandAlias( | ||
| "ci", | ||
| "; project /; headerCheck; scalafmtSbtCheck; scalafmtCheck; clean; test; coreJVM/mimaReportBinaryIssues; root/unidoc213; set Global / useJSEnv := JSEnv.Firefox; testsJS/test; webWorkerTests/test; set Global / useJSEnv := JSEnv.Chrome; testsJS/test; webWorkerTests/test; set Global / useJSEnv := JSEnv.NodeJS" | ||
| "; project /; headerCheck; scalafmtSbtCheck; scalafmtCheck; clean; test; coreJVM/mimaReportBinaryIssues; root/unidoc213; set Global / useJSEnv := JSEnv.Firefox; testsJS/test; webWorkerTests/test; set Global / useJSEnv := JSEnv.Chrome; testsJS/test; webWorkerTests/test; set Global / useJSEnv := JSEnv.JSDOMNodeJS; testsJS/test; set Global / useJSEnv := JSEnv.NodeJS" | ||
| ) | ||
|
|
||
| addCommandAlias( | ||
|
|
@@ -192,6 +201,7 @@ def browserCiCommand(browser: JSEnv) = | |
| s"; set Global / useJSEnv := JSEnv.$browser; project rootJS; headerCheck; scalafmtCheck; clean; testsJS/test; webWorkerTests/test; set Global / useJSEnv := JSEnv.NodeJS" | ||
| addCommandAlias("ciFirefox", browserCiCommand(Firefox)) | ||
| addCommandAlias("ciChrome", browserCiCommand(Chrome)) | ||
| addCommandAlias("ciJSDOMNodeJS", browserCiCommand(JSDOMNodeJS)) | ||
|
|
||
| addCommandAlias("prePR", "; root/clean; scalafmtSbt; +root/scalafmtAll; +root/headerCreate") | ||
|
|
||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.