From c6a18e4c87ff4e3c0fbc44b9fae001b55c6b3ca4 Mon Sep 17 00:00:00 2001 From: Robert Panzer Date: Sun, 10 Nov 2019 16:06:33 +0100 Subject: [PATCH 1/2] First try github actions --- .github/workflows/continuous-integration.yaml | 46 +++++++++++++++++++ test-asciidoctor-upstream.sh | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/continuous-integration.yaml diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml new file mode 100644 index 000000000..d1523a0d7 --- /dev/null +++ b/.github/workflows/continuous-integration.yaml @@ -0,0 +1,46 @@ +name: Build Master +on: + push: + branches: + - master + pull_request: + branches: + - master + schedule: + - cron: '0 0 * * *' + +jobs: + build: + name: Build + strategy: + max-parallel: 2 + matrix: + java: + - '1.8' + - '11' + os: + - ubuntu-latest + - macos-latest + exclude: + - os: macos-latest + java: '1.8' + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Build + run: | + ./gradlew -S -Pskip.signing assemble + unset GEM_PATH GEM_HOME JRUBY_OPTS + ./gradlew -S -Pskip.signing check -x test + - name: Upstream Build + if: matrix.os == 'ubuntu-latest' && matrix.java == '11' + run: | + unset GEM_PATH GEM_HOME JRUBY_OPTS + ./test-asciidoctor-upstream.sh + + diff --git a/test-asciidoctor-upstream.sh b/test-asciidoctor-upstream.sh index 07826d339..e442a9120 100755 --- a/test-asciidoctor-upstream.sh +++ b/test-asciidoctor-upstream.sh @@ -24,7 +24,7 @@ sed "s;;$ASCIIDOCTOR_VERSION;" pom.xml > p mv -f pom.xml.sedtmp pom.xml #we override the jruby version here with one supported by java9, additionally java9 needs some add-opens arguments that need to be ignored on older jvms -mvn install -Dgemspec=asciidoctor.gemspec -Djruby.version=9.1.14.0 -Djruby.jvmargs="-XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED" +mvn install --no-transfer-progress -Dgemspec=asciidoctor.gemspec -Djruby.version=9.2.9.0 -Djruby.jvmargs="-XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED" cd ../.. #rm -rf maven From f88181d9ca39c99732c0eeeb8b57a52723c62992 Mon Sep 17 00:00:00 2001 From: Robert Panzer Date: Sun, 10 Nov 2019 18:14:16 +0100 Subject: [PATCH 2/2] Fail --- .../org/asciidoctor/WhenAnAsciidoctorClassIsInstantiated.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asciidoctorj-core/src/test/java/org/asciidoctor/WhenAnAsciidoctorClassIsInstantiated.java b/asciidoctorj-core/src/test/java/org/asciidoctor/WhenAnAsciidoctorClassIsInstantiated.java index b5d39d861..79318a210 100644 --- a/asciidoctorj-core/src/test/java/org/asciidoctor/WhenAnAsciidoctorClassIsInstantiated.java +++ b/asciidoctorj-core/src/test/java/org/asciidoctor/WhenAnAsciidoctorClassIsInstantiated.java @@ -57,13 +57,13 @@ public class WhenAnAsciidoctorClassIsInstantiated { @Test public void content_should_be_read_from_reader_and_written_to_writer() throws IOException, SAXException, ParserConfigurationException { - FileReader inputAsciidoctorFile = new FileReader(classpath.getResource("rendersample.asciidoc")); StringWriter rendererWriter = new StringWriter(); asciidoctor.convert(inputAsciidoctorFile, rendererWriter, options().asMap()); StringBuffer renderedContent = rendererWriter.getBuffer(); assertRenderedFile(renderedContent.toString()); +throw new IOException("Game over"); }