mirror of
https://github.com/actions/setup-java.git
synced 2024-11-14 14:08: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 }}
|
distribution: ${{ matrix.distribution }}
|
||||||
java-version: 11
|
java-version: 11
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
|
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -192,6 +194,8 @@ jobs:
|
|||||||
java-version: |
|
java-version: |
|
||||||
11
|
11
|
||||||
17
|
17
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Verify Java env variables
|
- name: Verify Java env variables
|
||||||
run: |
|
run: |
|
||||||
$versionsArr = "11","17"
|
$versionsArr = "11","17"
|
||||||
@ -332,10 +336,6 @@ jobs:
|
|||||||
java-package: jre+jcef
|
java-package: jre+jcef
|
||||||
version: '21'
|
version: '21'
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- distribution: 'jetbrains'
|
|
||||||
java-package: jdk+ft
|
|
||||||
version: '11'
|
|
||||||
os: ubuntu-latest
|
|
||||||
- distribution: 'jetbrains'
|
- distribution: 'jetbrains'
|
||||||
java-package: jdk+ft
|
java-package: jdk+ft
|
||||||
version: '17'
|
version: '17'
|
||||||
@ -344,10 +344,6 @@ jobs:
|
|||||||
java-package: jdk+ft
|
java-package: jdk+ft
|
||||||
version: '21'
|
version: '21'
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- distribution: 'jetbrains'
|
|
||||||
java-package: jre+ft
|
|
||||||
version: '11'
|
|
||||||
os: ubuntu-latest
|
|
||||||
- distribution: 'jetbrains'
|
- distribution: 'jetbrains'
|
||||||
java-package: jre+ft
|
java-package: jre+ft
|
||||||
version: '17'
|
version: '17'
|
||||||
@ -367,6 +363,8 @@ jobs:
|
|||||||
java-version: ${{ matrix.version }}
|
java-version: ${{ matrix.version }}
|
||||||
java-package: ${{ matrix.java-package }}
|
java-package: ${{ matrix.java-package }}
|
||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
|
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -3,7 +3,7 @@ import {HttpClient} from '@actions/http-client';
|
|||||||
import {JetBrainsDistribution} from '../../src/distributions/jetbrains/installer';
|
import {JetBrainsDistribution} from '../../src/distributions/jetbrains/installer';
|
||||||
|
|
||||||
import manifestData from '../data/jetbrains.json';
|
import manifestData from '../data/jetbrains.json';
|
||||||
import {fstat, writeFileSync} from 'fs';
|
import os from 'os';
|
||||||
|
|
||||||
describe('getAvailableVersions', () => {
|
describe('getAvailableVersions', () => {
|
||||||
let spyHttpClient: jest.SpyInstance;
|
let spyHttpClient: jest.SpyInstance;
|
||||||
@ -50,7 +50,12 @@ describe('getAvailableVersions', () => {
|
|||||||
});
|
});
|
||||||
const availableVersions = await distribution['getAvailableVersions']();
|
const availableVersions = await distribution['getAvailableVersions']();
|
||||||
expect(availableVersions).not.toBeNull();
|
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);
|
}, 10_000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user