From 2f5424a611fcd3b031928b1f9436af11b9c09116 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Thu, 12 Dec 2024 22:31:59 +0300 Subject: [PATCH 1/2] PhSafe in tests --- .../src/main/resources/org/eolang/maven/pre/to-java.xsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl b/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl index b4432df20f..0b238bf7e2 100644 --- a/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl +++ b/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl @@ -536,9 +536,9 @@ SOFTWARE. new Dataized( - new + new PhSafe(new - () + ()) ).asBool() From e6c55c7721dfbfd26af0dca1514538130cb48061 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Fri, 13 Dec 2024 07:35:30 +0300 Subject: [PATCH 2/2] fix with deps --- .github/workflows/benchmark.yml | 4 ++-- .github/workflows/mvn.yml | 3 +++ .github/workflows/qulice.yml | 4 ++-- .../src/test/resources/META-INF/MANIFEST.MF | 2 +- eo-parser/src/test/resources/META-INF/MANIFEST.MF | 2 +- eo-runtime/pom.xml | 6 ++++++ eo-runtime/src/test/java/integration/PhiUnphiIT.java | 5 +++-- eo-runtime/src/test/java/integration/SnippetIT.java | 12 +++--------- eo-runtime/src/test/resources/META-INF/MANIFEST.MF | 2 +- 9 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 4468ebfb83..d8272114a1 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -40,8 +40,8 @@ jobs: - uses: actions/cache@v4 with: path: ~/.m2/repository - key: ubuntu-jdk-21-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ubuntu-jdk-21-maven- + key: ubuntu-benchmark-jdk-21-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ubuntu-benchmark-jdk-21-maven- - run: mvn clean install --errors --batch-mode -Deo.xslMeasuresFile=measures.csv - run: | set -x diff --git a/.github/workflows/mvn.yml b/.github/workflows/mvn.yml index 8091fcaca7..23ea36034a 100644 --- a/.github/workflows/mvn.yml +++ b/.github/workflows/mvn.yml @@ -73,4 +73,7 @@ jobs: echo multiplexing = false >> %USERPROFILE%\.cargo\config.toml shell: cmd - run: cargo --version + - uses: JesseTG/rm@v1.0.3 + with: + path: ~/.m2/repository/org/eolang - run: mvn clean install --errors --batch-mode diff --git a/.github/workflows/qulice.yml b/.github/workflows/qulice.yml index dff0c67ccf..df9dbcbe5d 100644 --- a/.github/workflows/qulice.yml +++ b/.github/workflows/qulice.yml @@ -41,6 +41,6 @@ jobs: - uses: actions/cache@v4 with: path: ~/.m2/repository - key: ubuntu-jdk-21-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ubuntu-jdk-21-maven- + key: ubuntu-qulice-jdk-21-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ubuntu-qulice-jdk-21-maven- - run: mvn clean install -DskipTests -DskipITs -Pqulice --errors --batch-mode diff --git a/eo-maven-plugin/src/test/resources/META-INF/MANIFEST.MF b/eo-maven-plugin/src/test/resources/META-INF/MANIFEST.MF index 3ce6ec92ab..8b328fa37b 100644 --- a/eo-maven-plugin/src/test/resources/META-INF/MANIFEST.MF +++ b/eo-maven-plugin/src/test/resources/META-INF/MANIFEST.MF @@ -1,3 +1,3 @@ -EO-Version: 0.0-SNAPSHOT +EO-Version: ${project.version} EO-Revision: 1234567 EO-Dob: 2023-03-19T00:00:00 diff --git a/eo-parser/src/test/resources/META-INF/MANIFEST.MF b/eo-parser/src/test/resources/META-INF/MANIFEST.MF index 9f3562c435..8b328fa37b 100644 --- a/eo-parser/src/test/resources/META-INF/MANIFEST.MF +++ b/eo-parser/src/test/resources/META-INF/MANIFEST.MF @@ -1,3 +1,3 @@ -EO-Version: 0.0.0 +EO-Version: ${project.version} EO-Revision: 1234567 EO-Dob: 2023-03-19T00:00:00 diff --git a/eo-runtime/pom.xml b/eo-runtime/pom.xml index 208627d689..ed104d2497 100644 --- a/eo-runtime/pom.xml +++ b/eo-runtime/pom.xml @@ -98,6 +98,12 @@ SOFTWARE. test + + com.jcabi + jcabi-manifests + + test + org.cactoos cactoos diff --git a/eo-runtime/src/test/java/integration/PhiUnphiIT.java b/eo-runtime/src/test/java/integration/PhiUnphiIT.java index 3c95229dd3..41855eab6a 100755 --- a/eo-runtime/src/test/java/integration/PhiUnphiIT.java +++ b/eo-runtime/src/test/java/integration/PhiUnphiIT.java @@ -23,6 +23,7 @@ */ package integration; +import com.jcabi.manifests.Manifests; import com.yegor256.MayBeSlow; import com.yegor256.Mktmp; import com.yegor256.MktmpResolver; @@ -74,7 +75,7 @@ void runsTestsAfterPhiAndUnphi(final @Mktmp Path temp) throws IOException { "eo-maven-plugin", System.getProperty( "eo.version", - "1.0-SNAPSHOT" + Manifests.read("EO-Version") ) ) .execution("phi-unphi") @@ -136,7 +137,7 @@ void runsTestsAfterPhiAndUnphi(final @Mktmp Path temp) throws IOException { "eo-maven-plugin", System.getProperty( "eo.version", - "1.0-SNAPSHOT" + Manifests.read("EO-Version") ) ) .execution("compile") diff --git a/eo-runtime/src/test/java/integration/SnippetIT.java b/eo-runtime/src/test/java/integration/SnippetIT.java index 1540cbc13c..5ba9cbf713 100755 --- a/eo-runtime/src/test/java/integration/SnippetIT.java +++ b/eo-runtime/src/test/java/integration/SnippetIT.java @@ -23,6 +23,7 @@ */ package integration; +import com.jcabi.manifests.Manifests; import com.yegor256.MayBeSlow; import com.yegor256.Mktmp; import com.yegor256.MktmpResolver; @@ -84,14 +85,7 @@ void runsAllSnippets(final String yml, final @Mktmp Path temp) throws IOExceptio xtory.map().get("eo") ).getBytes(StandardCharsets.UTF_8) ); - f.dependencies().append( - "org.eolang", - "eo-runtime", - System.getProperty( - "eo.version", - "1.0-SNAPSHOT" - ) - ); + f.dependencies().appendItself(); f.build() .plugins() .append( @@ -99,7 +93,7 @@ void runsAllSnippets(final String yml, final @Mktmp Path temp) throws IOExceptio "eo-maven-plugin", System.getProperty( "eo.version", - "1.0-SNAPSHOT" + Manifests.read("EO-Version") ) ) .execution("compile") diff --git a/eo-runtime/src/test/resources/META-INF/MANIFEST.MF b/eo-runtime/src/test/resources/META-INF/MANIFEST.MF index 3ce6ec92ab..8b328fa37b 100644 --- a/eo-runtime/src/test/resources/META-INF/MANIFEST.MF +++ b/eo-runtime/src/test/resources/META-INF/MANIFEST.MF @@ -1,3 +1,3 @@ -EO-Version: 0.0-SNAPSHOT +EO-Version: ${project.version} EO-Revision: 1234567 EO-Dob: 2023-03-19T00:00:00