Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI workflow #749

Merged
merged 12 commits into from
Oct 11, 2020
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 12.16.2
- name: Cache gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache npm cache directory
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Lint
uses: eskatos/gradle-command-action@v1
with:
Expand Down Expand Up @@ -65,6 +81,14 @@ jobs:
with:
java-version: ${{ matrix.java-version }}
architecture: x64
- name: Cache vscode
uses: actions/cache@v2
with:
path: |
extension/.vscode-test
key: ${{ runner.os }}-vscode-${{ hashFiles('**/vscode-version.ts') }}
restore-keys: |
${{ runner.os }}-vscode-
- name: Build Extension
uses: eskatos/gradle-command-action@v1
with:
Expand Down Expand Up @@ -189,6 +213,22 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 12.16.2
- name: Cache gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache npm cache directory
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build & prepare extension
uses: eskatos/gradle-command-action@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.eslint": true
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
7 changes: 4 additions & 3 deletions extension/src/test/runTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import * as os from 'os';
import * as fs from 'fs-extra';

import { runTests, downloadAndUnzipVSCode } from 'vscode-test';
import { VSCODE_TEST_VERSION } from './vscode-version';

const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// TODO: consider also testing using insiders
const VSCODE_VERSION = '1.49.3';

async function runTestsWithGradle(
vscodeExecutablePath: string,
Expand Down Expand Up @@ -178,7 +177,9 @@ async function main(): Promise<void> {
path.resolve(__dirname, '../../test-fixtures/vscode-user/User'),
path.join(tmpDir, 'User')
);
const vscodeExecutablePath = await downloadAndUnzipVSCode(VSCODE_VERSION);
const vscodeExecutablePath = await downloadAndUnzipVSCode(
VSCODE_TEST_VERSION
);

let hasErr = false;

Expand Down
2 changes: 1 addition & 1 deletion extension/src/test/unit/taskUtil.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe(getSuiteName('taskUtil'), () => {
assert.strictEqual(tasks.length, 2);
});

it('should create vscode tasks for a super-massive project without throwing a callstack error', async () => {
it.skip('should create vscode tasks for a super-massive project without throwing a callstack error', async () => {
const gradleBuild = new GradleBuild();
const rootGradleProject = buildProject(
'root-project',
Expand Down
1 change: 1 addition & 0 deletions extension/src/test/vscode-version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const VSCODE_TEST_VERSION = '1.50.0';
1 change: 1 addition & 0 deletions extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"strict": true,
"rootDir": "src",
"noUnusedLocals": true,
"skipLibCheck": true,
"allowJs": true, // to support compiling the generated proto js files
"allowSyntheticDefaultImports": true
},
Expand Down
3 changes: 2 additions & 1 deletion npm-package/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"rootDir": "./",
"noUnusedLocals": true,
"allowJs": false,
"declaration": true
"declaration": true,
"skipLibCheck": true
},
"exclude": ["node_modules", "lib", "build"],
"include": ["./index.ts"]
Expand Down