Skip to content

Commit 30fc493

Browse files
authored
chore: Adopt GitHub Actions for CI (#454)
1 parent 2f49ab9 commit 30fc493

File tree

3 files changed

+151
-41
lines changed

3 files changed

+151
-41
lines changed

.github/workflows/build.yml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
linux:
11+
name: Linux
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 30
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup Build Environment
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
21+
sudo /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
22+
sleep 3
23+
24+
- name: Set up JDK 11
25+
uses: actions/setup-java@v1
26+
with:
27+
java-version: '11'
28+
29+
- name: Setup Node.js environment
30+
uses: actions/setup-node@v2
31+
with:
32+
node-version: 12
33+
34+
- name: Install Node.js modules
35+
run: npm install
36+
37+
- name: Install Gulp
38+
run: npm install -g gulp
39+
40+
- name: Install VSCE
41+
run: npm install -g vsce
42+
43+
- name: Lint
44+
run: gulp tslint
45+
46+
- name: Checkstyle
47+
run: gulp checkstyle
48+
49+
- name: Build OSGi bundle
50+
run: npm run build-server
51+
52+
- name: Build VSIX file
53+
run: vsce package
54+
55+
- name: Test extension
56+
run: DISPLAY=:99 npm test
57+
58+
- name: Print language server Log if job failed
59+
if: ${{ failure() }}
60+
run: find $HOME/.config/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
61+
62+
windows:
63+
name: Windows
64+
runs-on: windows-latest
65+
timeout-minutes: 30
66+
steps:
67+
- uses: actions/checkout@v2
68+
69+
- name: Set up JDK 11
70+
uses: actions/setup-java@v1
71+
with:
72+
java-version: '11'
73+
74+
- name: Setup Node.js environment
75+
uses: actions/setup-node@v2
76+
with:
77+
node-version: 12
78+
79+
- name: Install Node.js modules
80+
run: npm install
81+
82+
- name: Install Gulp
83+
run: npm install -g gulp --force
84+
85+
- name: Install VSCE
86+
run: npm install -g vsce
87+
88+
- name: Lint
89+
run: gulp tslint
90+
91+
- name: Checkstyle
92+
run: gulp checkstyle
93+
94+
- name: Build OSGi bundle
95+
run: npm run build-server
96+
97+
- name: Build VSIX file
98+
run: vsce package
99+
100+
- name: Test extension
101+
run: npm test
102+
103+
- name: Print language server Log if job failed
104+
if: ${{ failure() }}
105+
run: Get-ChildItem -Path $env:APPDATA/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log | cat
106+
107+
darwin:
108+
name: macOS
109+
runs-on: macos-latest
110+
timeout-minutes: 30
111+
steps:
112+
- uses: actions/checkout@v2
113+
114+
- name: Set up JDK 11
115+
uses: actions/setup-java@v1
116+
with:
117+
java-version: '11'
118+
119+
- name: Setup Node.js environment
120+
uses: actions/setup-node@v2
121+
with:
122+
node-version: 12
123+
124+
- name: Install Node.js modules
125+
run: npm install
126+
127+
- name: Install Gulp
128+
run: npm install -g gulp
129+
130+
- name: Install VSCE
131+
run: npm install -g vsce
132+
133+
- name: Lint
134+
run: gulp tslint
135+
136+
- name: Checkstyle
137+
run: gulp checkstyle
138+
139+
- name: Build OSGi bundle
140+
run: npm run build-server
141+
142+
- name: Build VSIX file
143+
run: vsce package
144+
145+
- name: Test extension
146+
run: npm test
147+
148+
- name: Print language server Log if job failed
149+
if: ${{ failure() }}
150+
run: find $HOME/Library/Application\ Support/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;

.travis.yml

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

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ node_modules
1616
scripts
1717
extension.bundle.ts
1818
javaConfig.json
19+
.github/**
1920

2021
# Ignore output of code sign
2122
server/*.md

0 commit comments

Comments
 (0)