Skip to content

Commit

Permalink
Enable CI on AppVeyor (#872)
Browse files Browse the repository at this point in the history
Fixes #402
  • Loading branch information
DonJayamanne authored Feb 22, 2018
1 parent 752709f commit 5bc6c1c
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 2 deletions.
29 changes: 29 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
environment:
matrix:
- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.3"
PYTHON_ARCH: "32"
nodejs_version: "8.9.1"
TRAVIS: "true"

init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"

install:
- ps: Install-Product node $env:nodejs_version
- npm i -g yarn
- yarn
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- pip install -U pip
- python --version
- python -m easy_install -U setuptools
- "%PYTHON%/Scripts/pip.exe install --upgrade -r requirements.txt"

test_script:
- yarn run clean
- yarn run vscode:prepublish
- yarn run testDebugger --silent
- yarn run testSingleWorkspace --silent
- yarn run testMultiWorkspace --silent

build: off
Binary file added python-0.7.0.vsix
Binary file not shown.
21 changes: 21 additions & 0 deletions src/test/aaFirstTest/aaFirstTest.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import { activated } from '../../client/extension';
import { initialize } from '../initialize';

// NOTE:
// We need this to be run first, as this ensures the extension activates.
// Sometimes it can take more than 25 seconds to complete (as the extension looks for interpeters, and the like).
// So lets wait for a max of 1 minute for the extension to activate (note, subsequent load times are faster).

suite('Activate Extension', () => {
suiteSetup(async function () {
// tslint:disable-next-line:no-invalid-this
this.timeout(60000);
await initialize();
});
test('Python extension has activated', async () => {
await activated;
});
});
2 changes: 1 addition & 1 deletion src/test/common/variables/envVarsService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ suite('Environment Variables Service', () => {
const expectedPythonPath = '/usr/one/three:/usr/one/four';
const expectedPath = '/usr/x:/usr/y';
expect(vars).to.not.equal(undefined, 'Variables is is undefiend');
expect(Object.keys(vars!)).lengthOf(4, 'Incorrect number of variables');
expect(Object.keys(vars!)).lengthOf(5, 'Incorrect number of variables');
expect(vars).to.have.property('X', '1', 'X value is invalid');
expect(vars).to.have.property('Y', '2', 'Y value is invalid');
expect(vars).to.have.property('PYTHONPATH', expectedPythonPath, 'PYTHONPATH value is invalid');
Expand Down
2 changes: 1 addition & 1 deletion src/test/debugger/misc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ const EXPERIMENTAL_DEBUG_ADAPTER = path.join(__dirname, '..', '..', 'client', 'd
expect(varb).to.be.not.equal('undefined', 'variable \'b\' is undefined');
expect(varb.value).to.be.equal('2');
expect(varfile).to.be.not.equal('undefined', 'variable \'__file__\' is undefined');
expect(varfile.value).to.be.equal(`'${path.join(debugFilesPath, 'sample2.py')}'`);
expect(path.normalize(varfile.value)).to.be.equal(`'${path.normalize(path.join(debugFilesPath, 'sample2.py'))}'`);
expect(vardoc).to.be.not.equal('undefined', 'variable \'__doc__\' is undefined');
});
test('Test editing variables', async () => {
Expand Down
3 changes: 3 additions & 0 deletions src/testMultiRootWkspc/workspace4/.env5
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
X=1
Y=2
PYTHONPATH=/usr/one/three:/usr/one/four
# Unix PATH variable
PATH=/usr/x:/usr/y
# Windows Path variable
Path=/usr/x:/usr/y

0 comments on commit 5bc6c1c

Please sign in to comment.