fix: avoid noisy jshell logging in dockerfile #4116
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci-build | |
on: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- '*.*' | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
jobs: | |
updatewebsite: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
with: | |
fetch-depth: 2 | |
- name: Verify Changed files in docs | |
uses: tj-actions/verify-changed-files@bcb4e766c132157cda3d1e8c7ca3d68d86d6ae6b # v8.1 | |
id: verify-changed-files | |
with: | |
files: | | |
docs | |
- name: update website | |
if: ${{ github.ref == 'refs/heads/main' && steps.verify-changed-files.outputs.files_changed == 'true'}} | |
uses: benc-uk/workflow-dispatch@798e70c97009500150087d30d9f11c5444830385 # v1 | |
with: | |
workflow: github-pages | |
repo: jbangdev/jbang.dev | |
token: ${{ secrets.BREW_GITHUB_TOKEN }} | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
name: build-and-testing | |
steps: | |
- name: Rate limit info | |
run: 'curl -H "Accept: application/vnd.github+json" https://api.github.com/rate_limit' | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@a283f9441d2d96eb62436dc46d7014f5d357ac22 # v3 | |
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} | |
with: | |
limit-access-to-actor: true | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # v1 | |
- name: install-java8 | |
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3 | |
with: | |
java-version: 11 | |
distribution: temurin | |
cache: gradle | |
- name: build-gradle | |
run: ./gradlew --no-daemon clean build installDist publish --build-cache --scan -s | |
- name: integration-test-non-windows | |
if: runner.os != 'Windows' | |
run: | | |
export PATH=`pwd`/build/install/jbang/bin:$PATH | |
cd itests | |
./test_suite.sh | |
./itests.sh | |
- name: add-to-path | |
run: echo "../build/install/jbang/bin" >> $env:GITHUB_PATH | |
- name: integration-test-windows | |
if: runner.os == 'Windows' | |
working-directory: itests | |
run: | | |
echo "::add-matcher::.github/karatewindows-matcher.json" | |
.\itests.cmd | |
echo "::remove-matcher owner=karate-windows::" | |
- name: codecoverage-report | |
run: | | |
./gradlew --no-daemon jacocoTestReport | |
- name: Upload Test Report | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 | |
if: always() # always run even if the previous step fails | |
with: | |
name: junit-test-results | |
path: '**/build/test-results/test/TEST-*.xml' | |
retention-days: 1 | |
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2 | |
with: | |
#files: ./coverage1.xml,./coverage2.xml # optional | |
flags: ${{ runner.os }} # optional | |
name: ${{ runner.os }}-tests # optional | |
verbose: true # optional (default = false) | |
- name: build-choco-package | |
if: runner.os == 'Windows' | |
uses: actions/setup-dotnet@608ee757cfcce72c2e91e99aca128e0cae67de87 # v1 | |
with: | |
dotnet-version: '2.2.204' # SDK Version to use. | |
- name: build-choco | |
if: runner.os == 'Windows' | |
run: | | |
powershell | |
choco pack build/choco/jbang.nuspec | |
- name: Archive build results | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 | |
if: always() | |
with: | |
name: ${{ runner.os }}-build-${{ github.sha }} | |
path: build | |
- name: Upload jbang.zip | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 | |
if: always() && runner.os != 'Windows' | |
with: | |
name: jbang-${{ github.sha }} | |
path: build/install/jbang | |
testing: | |
needs: build | |
strategy: | |
## disable fail-fast so on variance failing don't fail the rest | |
#fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
java: [8,11,17,19] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 | |
with: | |
name: ${{ runner.os }}-build-${{ github.sha }} | |
path: build | |
- name: smoke-test | |
run: | | |
java -version | |
chmod +x ./build/install/jbang/bin/jbang | |
./build/install/jbang/bin/jbang init --template=cli helloworld.java | |
./build/install/jbang/bin/jbang --verbose helloworld.java | |
rm helloworld.java | |
- name: smoke-quarkus-test | |
run: | | |
java -version | |
chmod +x ./build/install/jbang/bin/jbang | |
./build/install/jbang/bin/jbang init --template=qcli qcli.java | |
./build/install/jbang/bin/jbang --fresh --verbose qcli.java | |
rm qcli.java | |
- name: smoke-quarkus-diff-version-test | |
run: | | |
java -version | |
chmod +x ./build/install/jbang/bin/jbang | |
./build/install/jbang/bin/jbang init --template=qcli qcli.java | |
./build/install/jbang/bin/jbang --fresh --verbose --java 17 qcli.java | |
rm qcli.java | |
- name: integration-test-non-windows | |
## karate can't run on java 17 or higher due to missing nashorn | |
if: runner.os != 'Windows' && matrix.java < 17 | |
run: | | |
export PATH=`pwd`/build/install/jbang/bin:$PATH | |
cd build/itests | |
chmod +x ./test_suite.sh | |
chmod +x ./itests.sh | |
./test_suite.sh | |
./itests.sh | |
- name: add-to-path | |
run: echo "../build/install/jbang/bin" >> $env:GITHUB_PATH | |
- name: integration-test-windows | |
if: runner.os == 'Windows' && matrix.java < 17 | |
working-directory: itests | |
run: | | |
echo "::add-matcher::.github/karatewindows-matcher.json" | |
.\itests.cmd | |
echo "::remove-matcher owner=karate-windows::" |