fix e2e tests

This commit is contained in:
Maxim Lobanov 2021-03-16 12:45:33 +03:00
parent b091e7652f
commit 242eb73434
2 changed files with 15 additions and 3 deletions

View file

@ -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"
}

View file

@ -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`