Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Aug 10, 2023
2 parents 5928a6d + 8976e4e commit c6bb269
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/mvn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
push:
branches:
- master
paths-ignore: ['paper/**', 'sandbox/**']
paths-ignore: [ 'paper/**', 'sandbox/**' ]
pull_request:
branches:
- master
paths-ignore: ['paper/**', 'sandbox/**']
paths-ignore: [ 'paper/**', 'sandbox/**' ]
concurrency:
group: mvn-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -17,8 +17,8 @@ jobs:
name: mvn
strategy:
matrix:
os: [ubuntu-20.04, windows-2022, macos-12]
java: [11, 20]
os: [ ubuntu-20.04, windows-2022, macos-12 ]
java: [ 11, 20 ]
runs-on: ${{ matrix.os }}
env:
CONVERT_PATH: /tmp/antlr4-to-bnf-converter
Expand All @@ -33,6 +33,21 @@ jobs:
path: ~/.m2/repository
key: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-
# The next step is required to avoid some exceptions that occur
# when running on Windows OS. For example like this one:
# - https://github.com/objectionary/eo/issues/2336
# The step disables http multiplexing in Cargo which cause some problems
# on Windows OS.
# You can read more about multiplexing right here
# - https://stackoverflow.com/questions/36517829/what-does-multiplexing-mean-in-http-2
# Multiplexing in Rust:
# - https://doc.rust-lang.org/cargo/reference/config.html#httpmultiplexing
- name: Set Cargo config (Windows)
if: matrix.os == 'windows-2022'
run: |
echo [http] >> %USERPROFILE%\.cargo\config.toml
echo multiplexing = false >> %USERPROFILE%\.cargo\config.toml
shell: cmd
- run: |
mkdir -p $CONVERT_PATH
wget --quiet http://public.yegor256.com/convert.zip -O /tmp/convert.zip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand All @@ -41,13 +40,6 @@
* Test case for {@link BinarizeMojo}.
*
* @since 0.1
* @todo #1307:30min Resolve flaky tests: 1) {@code savesToCache} on windows CI,
* see an example
* <a href="https://github.com/objectionary/eo/actions/runs/5713175702/job/
* 15478085290?pr=2332">here</a>
* 2) {@code binarizesWithoutErrors}, see an example
* <a href="https://github.com/objectionary/eo/actions/runs/5713661855/job/
* 15479445307?pr=2332">here</a>
*/
final class BinarizeMojoTest {

Expand All @@ -64,7 +56,6 @@ final class BinarizeMojoTest {
@Test
@Tag("slow")
@ExtendWith(CargoCondition.class)
@Disabled
void binarizesWithoutErrors(@TempDir final Path temp) throws Exception {
final FakeMaven maven;
synchronized (BinarizeMojoTest.class) {
Expand Down Expand Up @@ -93,7 +84,6 @@ void failsWithIncorrectInsert(@TempDir final Path temp) throws IOException {

@Test
@Tag("slow")
@Disabled
void savesToCache(@TempDir final Path temp) throws IOException {
final FakeMaven maven;
final Path cache = temp.resolve(".cache");
Expand Down
10 changes: 10 additions & 0 deletions eo-runtime/src/test/java/EOorg/EOeolang/EOio/EOstdoutTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.eolang.Phi;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
Expand All @@ -46,10 +47,17 @@
* Test case for {@link EOstdout}.
*
* @since 0.1
* @todo #2336:90min Enable all the tests in EOstdoutTest.
* The tests are disabled because they are flaky.
* The original issue is here:
* - https://github.com/objectionary/eo/issues/2371
* When the issue is fixed, enable the tests and remove the @Disabled annotation.
* Don't forget to remove the puzzle itself.
*/
public final class EOstdoutTest {

@Test
@Disabled("https://github.com/objectionary/eo/issues/2371")
public void printsString() {
final Phi format = new Data.ToPhi("Hello, world!\n");
final Phi phi = new PhWith(
Expand All @@ -66,6 +74,7 @@ public void printsString() {
@StdIo
@ParameterizedTest
@CsvSource({"lt", "gt", "lte", "gte"})
@Disabled("https://github.com/objectionary/eo/issues/2371")
public void doesNotPrintTwiceOnIntComparisonMethods(final String method, final StdOut out) {
final String str = "Hello world";
new Dataized(
Expand Down Expand Up @@ -100,6 +109,7 @@ public void doesNotPrintTwiceOnIntComparisonMethods(final String method, final S
@StdIo
@ParameterizedTest
@CsvSource({"lt", "gt", "lte", "gte"})
@Disabled("https://github.com/objectionary/eo/issues/2371")
public void doesNotPrintTwiceOnFloatComparisonMethods(final String method, final StdOut out) {
final String str = "Hello world";
new Dataized(
Expand Down

2 comments on commit c6bb269

@0pdd
Copy link

@0pdd 0pdd commented on c6bb269 Aug 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 1307-e36f75dd disappeared from eo-maven-plugin/src/test/java/org/eolang/maven/BinarizeMojoTest.java), that's why I closed #2336. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

@0pdd
Copy link

@0pdd 0pdd commented on c6bb269 Aug 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 2336-caedc478 discovered in eo-runtime/src/test/java/EOorg/EOeolang/EOio/EOstdoutTest.java) and submitted as #2373. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.