Skip to content

Commit c86f4f4

Browse files
committed
Move pull request verification job to GitHub Actions
- Migrate away from Travis CI and to GitHub Actions Signed-off-by: Roland Grunberg <[email protected]>
1 parent 18e9821 commit c86f4f4

File tree

3 files changed

+47
-42
lines changed

3 files changed

+47
-42
lines changed

.github/workflows/pr-verify.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: pr-verify
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
pr-verify-job:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [macos-latest, ubuntu-latest]
11+
steps:
12+
- name: Check Out Code
13+
uses: actions/checkout@v2
14+
- name: Set Up NodeJS
15+
uses: actions/setup-node@v2
16+
with:
17+
node-version: '12.22.1'
18+
- name: Set Up Java
19+
uses: actions/setup-java@v2
20+
with:
21+
java-version: '11'
22+
distribution: 'adopt'
23+
- run: npm install -g typescript vsce
24+
- run: wget http://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz
25+
- run: mkdir server && tar -xvzf jdt-language-server-latest.tar.gz -C ./server && rm jdt-language-server-latest.tar.gz
26+
- run: npm install
27+
- run: npm run compile
28+
- run: npm run vscode:prepublish
29+
- run: vsce package
30+
- run: ls -ll java-*vsix
31+
- run: npm run tslint
32+
- name: Run Tests
33+
if: runner.os == 'Linux'
34+
env:
35+
SKIP_COMMANDS_TEST: true
36+
run: $(echo "xvfb-run --auto-servernum") npm run test --silent
37+
- name: Run Tests
38+
if: runner.os != 'Linux'
39+
env:
40+
SKIP_COMMANDS_TEST: true
41+
SKIP_CLASSPATH_TEST: true
42+
run: npm run test --silent

.travis.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

test/standard-mode-suite/publicApi.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import * as fse from 'fs-extra';
99
import { getJavaConfiguration } from '../../src/utils';
1010
import { Commands } from '../../src/commands';
1111
import { constants } from '../common';
12+
import { env } from 'process';
1213

1314
const pomPath: string = path.join(constants.projectFsPath, 'pom.xml');
1415
const gradleTestFolder: string = path.join(constants.projectFsPath, 'testGradle');
@@ -97,6 +98,10 @@ suite('Public APIs - Standard', () => {
9798
});
9899

99100
test('onDidClasspathUpdate should work', async function () {
101+
if (env['SKIP_CLASSPATH_TEST'] === 'true') {
102+
console.log('Skipping "onDidClasspathUpdate should work"');
103+
return;
104+
}
100105
const pomContent: string = await fse.readFile(pomPath, 'utf-8');
101106
const api: ExtensionAPI = extensions.getExtension('redhat.java').exports;
102107

0 commit comments

Comments
 (0)