Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
@@ -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


Original file line number Diff line number Diff line change
Expand Up @@ -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");

}

Expand Down
2 changes: 1 addition & 1 deletion test-asciidoctor-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ sed "s;<version></version>;<version>$ASCIIDOCTOR_VERSION</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
Expand Down