Skip to content

Commit

Permalink
Merge pull request #3427 from objectionary/hone
Browse files Browse the repository at this point in the history
hone
  • Loading branch information
yegor256 authored Nov 5, 2024
2 parents eb316c0 + 336378d commit daea8fc
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/hone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# The MIT License (MIT)
#
# Copyright (c) 2016-2024 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.
---
name: hone
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: hone-${{ github.ref }}
cancel-in-progress: true
jobs:
hone:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-
- run: mvn install -DskipTests -Dinvoker.skip -Phone
- run: mvn test -Phone -pl :eo-runtime
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private static String translated(final Xsline xsline, final XML xmir)
final List<String> phi = translated.xpath("program/phi/text()");
if (phi.isEmpty()) {
throw new ImpossibleToPhiTranslationException(
"Xpath 'phi/text()' is not found in translated XMIR"
"Xpath 'phi/text()' is not found in the translated XMIR"
);
}
return phi.get(0);
Expand Down
27 changes: 27 additions & 0 deletions eo-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -380,5 +380,32 @@ SOFTWARE.
</plugins>
</build>
</profile>
<profile>
<id>hone</id>
<properties>
<hone.version>0.0.22</hone.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eolang</groupId>
<artifactId>hone-maven-plugin</artifactId>
<version>${hone.version}</version>
<executions>
<execution>
<goals>
<goal>pull</goal>
<goal>optimize</goal>
<goal>rmi</goal>
</goals>
<configuration>
<image>yegor256/hone:${hone.version}</image>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
3 changes: 2 additions & 1 deletion eo-runtime/src/main/java/EOorg/EOeolang/EOerror.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ private static String message(final Throwable exp) {
ret.append(exp.getMessage().replace("%", "%%"));
}
if (exp.getCause() != null) {
ret.append("; caused by ").append(ErrorMsg.message(exp.getCause()));
ret.append("; caused by ")
.append(ErrorMsg.message(exp.getCause()));
}
return ret.toString();
}
Expand Down

0 comments on commit daea8fc

Please sign in to comment.