Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 1547_eo_runtime
Browse files Browse the repository at this point in the history
# Conflicts:
#	eo-runtime/pom.xml
  • Loading branch information
volodya-lombrozo committed Dec 19, 2022
2 parents aa5d39f + 8e36025 commit dd75533
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
codecov:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/latexmk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: yegor256/latexmk-action@0.7.1
with:
path: paper
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mvn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
java: [11, 17]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
Expand Down
2 changes: 1 addition & 1 deletion eo-maven-plugin/src/it/fibonacci/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ SOFTWARE.
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration combine.self="override"/>
</plugin>
<plugin>
Expand Down
14 changes: 11 additions & 3 deletions eo-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ SOFTWARE.
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{argLine} -Xss${stack-size} -Duser.language=ru
-Duser.region=RU
<argLine>
@{argLine} -Xss${stack-size} -Duser.language=ru -Duser.region=RU
</argLine>
<systemProperties>
<java.util.logging.config.file>
Expand Down Expand Up @@ -149,7 +149,8 @@ SOFTWARE.
<targetDir>${project.basedir}/target/eo-test</targetDir>
<addSourcesRoot>false</addSourcesRoot>
<addTestSourcesRoot>true</addTestSourcesRoot>
<generatedDir>${project.basedir}/target/generated-test-sources
<generatedDir>
${project.basedir}/target/generated-test-sources
</generatedDir>
<withRuntimeDependency>false</withRuntimeDependency>
</configuration>
Expand All @@ -162,7 +163,14 @@ SOFTWARE.
<executions>
<execution>
<id>project-validate</id>
<!-- @todo #1575:30min Set 'verify' phase for the 'project-validate'. Replace the phase with 'verify' when #1576 will finished. This action will make the integration test work. -->
<phase>none</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>${project.basedir}/src/test/groovy/verify.groovy</source>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
65 changes: 65 additions & 0 deletions eo-runtime/src/test/groovy/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/**
* The MIT License (MIT)
*
* Copyright (c) 2016-2022 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

import java.nio.file.Files
import java.nio.file.Path
import java.util.stream.Collectors

println 'Verify that all java classes were compiled successfully'
Path binaries = basedir.toPath()
.resolve("target")
.resolve("classes")
.resolve("org")
.resolve("eolang");
Path classes = basedir.toPath()
.resolve("src")
.resolve("main")
.resolve("java")
.resolve("org")
.resolve("eolang");
Set<String> expected = Files.walk(classes)
.filter(it -> {
it.toString().endsWith(".java")
})
.map(Path::getFileName)
.map(Path::toString)
.map(it -> {
return it.replace(".java", ".class")
}).collect(Collectors.toSet())
Set<String> actual = Files.walk(binaries)
.filter(it -> {
it.toString().endsWith(".class")
})
.map(Path::getFileName)
.map(Path::toString)
.collect(Collectors.toSet())
if (!actual.containsAll(expected)) {
throw new IllegalStateException(
String.format(
"Not all classes are compiled\nExpected %s\nActual %s",
expected,
actual
)
)
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ SOFTWARE.
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand Down Expand Up @@ -269,7 +269,7 @@ SOFTWARE.
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration combine.self="override">
<source>8</source>
<target>8</target>
Expand Down

0 comments on commit dd75533

Please sign in to comment.