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

Continuous Integration on Windows #1103

Merged
merged 17 commits into from
Aug 1, 2019
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 30 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,37 @@ commands:

orbs:
helix-smoke-tests: adobe/helix-smoke-tests@0.0.7
win: circleci/windows-tools@0.0.4

jobs:
snyk:
executor: node8
working_directory: ~/repo

build_win:
parallelism: 1
executor: win/preview-default
steps:
- setup

- run:
name: prepare test git user
command: git config --global user.email "you@example.com" && git config --global user.name "Your Name"

# test & get code coverage
- run:
name: Running Tests with Snyk Agent
command: node snykmocha.js
- run: git config --global core.autocrlf false
- run:
name: prepare test git user
command: git config --global user.email "circleci@project-helix.io"
- run:
name: prepare test git user
command: git config --global user.name "CircleCi Build"
- checkout
- run: choco install nodejs --version 10.16.0
- run: npm install
- run: mkdir junit

# test & get code coverage
- run:
name: Test and Code Coverage
command: npm run test-ci-win
environment:
MOCHA_FILE: junit/test-results.xml

- store_test_results:
path: junit

- store_artifacts:
path: junit

build:
parallelism: 4
Expand Down Expand Up @@ -104,11 +118,12 @@ workflows:
- publish-pre-release:
requires:
- build
- build_win
filters:
branches:
only: master
- build
- snyk
- build_win

smoke:
jobs:
Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"check": "npm run lint && npm run test",
"test": "nyc --lines 90 --reporter=text --reporter=lcov mocha -t 5000",
"test-ci": "circleci tests glob 'test/test*.js' | circleci tests split --split-by=timings | xargs nyc --reporter=text --reporter=lcov mocha -R mocha-junit-reporter -t 5000 && codecov",
"test-ci-win": "./node_modules/.bin/mocha --reporter xunit test --reporter-options output=junit/test.xml -t 5000",
"lint": "./node_modules/.bin/eslint .",
"lint-ci": "circleci tests glob 'src/**/*.js' 'test/**/*.js' | circleci tests split | xargs eslint",
"semantic-release": "semantic-release",
Expand Down Expand Up @@ -37,7 +38,7 @@
"@adobe/fastly-native-promises": "^1.10.0",
"@adobe/helix-pipeline": "4.0.5",
"@adobe/helix-shared": "2.1.1",
"@adobe/helix-simulator": "2.12.18",
"@adobe/helix-simulator": "2.12.19",
"@adobe/htlengine": "3.2.1",
"@babel/core": "^7.5.5",
"@parcel/logger": "^1.11.0",
Expand Down
7 changes: 6 additions & 1 deletion test/testGitUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ describe('Testing GitUtils', () => {
assert.equal(await GitUtils.isDirty(testRoot, GIT_USER_HOME), true);
});

it('isDirty #unit with submodules', async () => {
it('isDirty #unit with submodules', async function test() {
tripodsan marked this conversation as resolved.
Show resolved Hide resolved
if (process.platform === 'win32') {
// windows has somehow problems wit adding file:// submodules. so we skip for now.
this.skip();
return;
}
// https://github.com/adobe/helix-cli/issues/614
const moduleRoot = await createTestRoot();

Expand Down