mirror of
https://github.com/actions/setup-java.git
synced 2024-11-13 21:48:05 +00:00
Fix JetBrains Tests, Issues in e2e-versions.yml
This commit is contained in:
parent
7e3fee94eb
commit
4e56c31b28
14
.github/workflows/e2e-versions.yml
vendored
14
.github/workflows/e2e-versions.yml
vendored
@ -157,6 +157,8 @@ jobs:
|
||||
distribution: ${{ matrix.distribution }}
|
||||
java-version: 11
|
||||
check-latest: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Verify Java
|
||||
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
|
||||
shell: bash
|
||||
@ -192,6 +194,8 @@ jobs:
|
||||
java-version: |
|
||||
11
|
||||
17
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Verify Java env variables
|
||||
run: |
|
||||
$versionsArr = "11","17"
|
||||
@ -332,10 +336,6 @@ jobs:
|
||||
java-package: jre+jcef
|
||||
version: '21'
|
||||
os: ubuntu-latest
|
||||
- distribution: 'jetbrains'
|
||||
java-package: jdk+ft
|
||||
version: '11'
|
||||
os: ubuntu-latest
|
||||
- distribution: 'jetbrains'
|
||||
java-package: jdk+ft
|
||||
version: '17'
|
||||
@ -344,10 +344,6 @@ jobs:
|
||||
java-package: jdk+ft
|
||||
version: '21'
|
||||
os: ubuntu-latest
|
||||
- distribution: 'jetbrains'
|
||||
java-package: jre+ft
|
||||
version: '11'
|
||||
os: ubuntu-latest
|
||||
- distribution: 'jetbrains'
|
||||
java-package: jre+ft
|
||||
version: '17'
|
||||
@ -367,6 +363,8 @@ jobs:
|
||||
java-version: ${{ matrix.version }}
|
||||
java-package: ${{ matrix.java-package }}
|
||||
distribution: ${{ matrix.distribution }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Verify Java
|
||||
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
|
||||
shell: bash
|
||||
|
@ -3,7 +3,7 @@ import {HttpClient} from '@actions/http-client';
|
||||
import {JetBrainsDistribution} from '../../src/distributions/jetbrains/installer';
|
||||
|
||||
import manifestData from '../data/jetbrains.json';
|
||||
import {fstat, writeFileSync} from 'fs';
|
||||
import os from 'os';
|
||||
|
||||
describe('getAvailableVersions', () => {
|
||||
let spyHttpClient: jest.SpyInstance;
|
||||
@ -50,7 +50,12 @@ describe('getAvailableVersions', () => {
|
||||
});
|
||||
const availableVersions = await distribution['getAvailableVersions']();
|
||||
expect(availableVersions).not.toBeNull();
|
||||
expect(availableVersions.length).toBe(manifestData.length * 2);
|
||||
|
||||
const length =
|
||||
os.platform() === 'win32'
|
||||
? manifestData.length * 2 - 4
|
||||
: manifestData.length * 2;
|
||||
expect(availableVersions.length).toBe(length);
|
||||
}, 10_000);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user