From 242eb73434aa365db5501d3126bfc569be32ef08 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Tue, 16 Mar 2021 12:45:33 +0300 Subject: [PATCH] fix e2e tests --- .github/workflows/e2e-publishing.yml | 6 +++--- README.md | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-publishing.yml b/.github/workflows/e2e-publishing.yml index 478e26fc..90b02b95 100644 --- a/.github/workflows/e2e-publishing.yml +++ b/.github/workflows/e2e-publishing.yml @@ -82,8 +82,8 @@ jobs: $xmlPath = Join-Path $HOME ".m2" "settings.xml" Get-Content $xmlPath | ForEach-Object { Write-Host $_ } - $xml = Get-Content $xmlPath -Raw - if ($raw -notlike '*maven*') { + $content = Get-Content $xmlPath -Raw + if ($content -notlike '*maven*') { throw "settings.xml file is not overwritten" } @@ -120,7 +120,7 @@ jobs: $content = Get-Content -Path $xmlPath -Raw Write-Host $content - if ($content -ne "Fake_XML") { + if ($content -notlike "*Fake_XML*") { throw "settings.xml file was overwritten but it should not be" } diff --git a/README.md b/README.md index b109577e..84429bd1 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ This action provides the following functionality for GitHub Actions runners: Inputs `java-version` and `distribution` are mandatory. See [Supported distributions](../README.md#Supported-distributions) section for a list of available options. ### Basic +**Adopt OpenJDK** ```yaml steps: - uses: actions/checkout@v2 @@ -30,6 +31,17 @@ steps: - run: java -cp java HelloWorldApp ``` +**Zulu OpenJDK** +```yaml +steps: +- uses: actions/checkout@v2 +- uses: actions/setup-java@v2-preview + with: + distribution: 'zulu' # See 'Supported distributions' for available options + java-version: '11' +- run: java -cp java HelloWorldApp +``` + #### Supported version syntax The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation: - major versions: `8`, `11`, `15`