Skip to content

Commit 6a6d92b

Browse files
committed
Enable GitHub Actions
Signed-off-by: Sheng Chen <sheche@microsoft.com>
1 parent 1dd62b3 commit 6a6d92b

File tree

1 file changed

+123
-0
lines changed

1 file changed

+123
-0
lines changed

.github/workflows/build.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
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 build tools
38+
run: npm install -g vsce gulp typescript
39+
40+
- name: Lint
41+
run: gulp tslint
42+
43+
- name: Package
44+
run: vsce package
45+
46+
- name: Test extension
47+
run: DISPLAY=:99 npm test
48+
49+
- name: Print language server Log if job failed
50+
if: ${{ failure() }}
51+
run: find $HOME/.config/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
52+
53+
windows:
54+
name: Windows
55+
runs-on: windows-latest
56+
timeout-minutes: 30
57+
steps:
58+
- uses: actions/checkout@v2
59+
60+
- name: Set up JDK 11
61+
uses: actions/setup-java@v1
62+
with:
63+
java-version: '11'
64+
65+
- name: Setup Node.js environment
66+
uses: actions/setup-node@v2
67+
with:
68+
node-version: 12
69+
70+
- name: Install Node.js modules
71+
run: npm install
72+
73+
- name: Install build tools
74+
run: npm install -g vsce gulp typescript
75+
76+
- name: Lint
77+
run: gulp tslint
78+
79+
- name: Package
80+
run: vsce package
81+
82+
- name: Test extension
83+
run: npm test
84+
85+
- name: Print language server Log if job failed
86+
if: ${{ failure() }}
87+
run: Get-ChildItem -Path $env:APPDATA/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log | cat
88+
89+
darwin:
90+
name: macOS
91+
runs-on: macos-latest
92+
timeout-minutes: 30
93+
steps:
94+
- uses: actions/checkout@v2
95+
96+
- name: Set up JDK 11
97+
uses: actions/setup-java@v1
98+
with:
99+
java-version: '11'
100+
101+
- name: Setup Node.js environment
102+
uses: actions/setup-node@v2
103+
with:
104+
node-version: 12
105+
106+
- name: Install Node.js modules
107+
run: npm install
108+
109+
- name: Install build tools
110+
run: npm install -g vsce gulp typescript
111+
112+
- name: Lint
113+
run: gulp tslint
114+
115+
- name: Package
116+
run: vsce package
117+
118+
- name: Test extension
119+
run: npm test
120+
121+
- name: Print language server Log if job failed
122+
if: ${{ failure() }}
123+
run: find $HOME/Library/Application\ Support/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;

0 commit comments

Comments
 (0)