Fix JetBrains Tests, Issues in e2e-versions.yml

This commit is contained in:
Gregory Mitchell 2024-11-11 14:06:05 +00:00 committed by GitHub
parent 7e3fee94eb
commit 4e56c31b28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 10 deletions

View File

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

View File

@ -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);
}); });