-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: improve ci config and process (#627)
* chore: improve ci config and process * fix: indent level in appveyor.yml matrix config * fix: remove before_script in appveyor.yml * fix: run lint and flow in circle ci builds * fix: remove prefer builtins flag on resolve plugin * fix: use | instead of > in circle.yml * fix: add parallelism back to circle ci builds * fix: use os.tmpdir() to resolve tmp dir path * dx: log database driver in circle ci builds * fix: tmpdir errors * fix: use lux:db reset instead of manual manipulation of sqlite file * fix: run database bootstrap commands from circle.yml * chore: typo in database driver log in test setup * refactor: resolve database driver from circle.yml * fix: predefine db setup as function in circle.yml * fix: indent level in circle.yml * refactor: reorginize circle.yml * dx: add deployment config to circle.yml * fix: update appveyor.yml config * deps: remove release dependency * deps: update 3rd party type declarations * fix: appveyor.yml error * fix: add build command to appveyor.yml * fix: set database password env var in appveyor.yml * fix: add dropdb command to postgres setup in appveyor.yml * fix: add --if-exists flag to dropdb in appveyor.yml * fix: mysql db setup in appveyor.yml * test: failing fs module tests test: failing fs module tests * fix: prevent test from trying to create root dir on windows
- Loading branch information
1 parent
d0795c3
commit 682d6fe
Showing
34 changed files
with
430 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ esproposal.class_static_fields=enable | |
esproposal.class_instance_fields=enable | ||
|
||
[version] | ||
0.37.4 | ||
^0.37.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,46 @@ | ||
image: Visual Studio 2015 | ||
build: off | ||
platform: x64 | ||
services: | ||
- mysql | ||
- postgresql | ||
environment: | ||
nodejs_version: 6 | ||
NODE_ENV: test | ||
CREATE_DATABASE: CREATE DATABASE lux_test; | ||
DROP_DATABASE: DROP DATABASE IF EXISTS lux_test; | ||
DATABASE_PASSWORD: Password12! | ||
matrix: | ||
- DATABASE_DRIVER: pg | ||
DATABASE_USERNAME: postgres | ||
- DATABASE_DRIVER: mysql2 | ||
DATABASE_USERNAME: root | ||
- DATABASE_DRIVER: sqlite3 | ||
services: | ||
- mysql | ||
install: | ||
- ps: C:\projects\lux\scripts\appveyor\install.ps1 | ||
- ps: Install-Product node $env:nodejs_version $env:platform | ||
- npm install | ||
- npm link | ||
- ps: Set-Location C:\projects\lux\test\test-app | ||
- npm install | ||
- ps: Set-Location C:\projects\lux | ||
before_test: | ||
- ps: C:\projects\lux\scripts\appveyor\before-test.ps1 | ||
- | | ||
SET PGUSER=postgres | ||
SET PGPASSWORD=%DATABASE_PASSWORD% | ||
PATH=C:\Program Files\PostgreSQL\9.5\bin\;%PATH% | ||
dropdb --if-exists lux_test | ||
createdb lux_test | ||
- ps: | | ||
$env:MYSQL_PWD="$env:DATABASE_PASSWORD" | ||
$mysql="C:\Program Files\MySql\MySQL Server 5.7\bin\mysql" | ||
Invoke-Expression "& '$mysql' -e '$env:DROP_DATABASE' -u root" | ||
Invoke-Expression "& '$mysql' -e '$env:CREATE_DATABASE' -u root" | ||
Remove-Item C:\projects\lux\test\test-app\db\* -Force -Include *.sqlite | ||
Write-Host $null >> C:\projects\lux\test\test-app\db\lux_test_test.sqlite | ||
- npm run clean | ||
- npm run build | ||
test_script: | ||
- npm run flow | ||
- npm run lint | ||
- npm test | ||
build: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,74 @@ | ||
test: | ||
override: | ||
- bash -e scripts/circle/before-script.sh: | ||
parallel: true | ||
- npm test && npm run test:codecov: | ||
parallel: true | ||
machine: | ||
node: | ||
version: 6 | ||
environment: | ||
NODE_ENV: test | ||
DROP_DATABASE: DROP DATABASE IF EXISTS lux_test; | ||
CREATE_DATABASE: CREATE DATABASE lux_test; | ||
DATABASE_USERNAME: ubuntu | ||
database: | ||
override: | ||
- psql -c "$DROP_DATABASE" -U postgres | ||
- psql -c "$CREATE_DATABASE" -U postgres | ||
- mysql -e "$DROP_DATABASE" | ||
- mysql -e "$CREATE_DATABASE" | ||
dependencies: | ||
pre: | ||
- | | ||
cd ../ | ||
if [ -d watchman ]; then | ||
cd watchman | ||
sudo make install | ||
else | ||
git clone https://github.com/facebook/watchman.git | ||
cd watchman | ||
git checkout v4.7.0 | ||
./autogen.sh | ||
./configure | ||
make | ||
sudo make install | ||
fi | ||
cd ../lux | ||
override: | ||
- bash -e scripts/circle/install.sh | ||
- npm install | ||
- npm link | ||
post: | ||
- | | ||
cd test/test-app | ||
npm install | ||
cd ../../ | ||
cache_directories: | ||
- /home/ubuntu/watchman | ||
compile: | ||
pre: | ||
- npm run clean | ||
override: | ||
- npm run build | ||
test: | ||
pre: | ||
- case $CIRCLE_NODE_INDEX in 0) export DATABASE_DRIVER="pg" ;; 1) export DATABASE_DRIVER="mysql2" ;; 2) export DATABASE_DRIVER="sqlite3" ;; esac: | ||
parallel: true | ||
override: | ||
- npm run flow: | ||
parallel: true | ||
- npm run lint: | ||
parallel: true | ||
- npm test -- -R mocha-junit-reporter: | ||
parallel: true | ||
environment: | ||
MOCHA_FILE: $CIRCLE_TEST_REPORTS/junit/test-results.xml | ||
post: | ||
- npm run codecov: | ||
parallel: true | ||
deployment: | ||
release: | ||
tag: /^(?:v\d.\d.\d)$/ | ||
commands: | ||
- npm run clean | ||
- npm run build | ||
- rm -rf ~/.npmrc && touch ~/.npmrc | ||
- echo //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN >> ~/.npmrc | ||
- npm publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// flow-typed signature: fb594485a8922c0c9f7af828ca88909b | ||
// flow-typed version: <<STUB>>/mocha-junit-reporter_v1.13.0/flow_v0.37.4 | ||
|
||
/** | ||
* This is an autogenerated libdef stub for: | ||
* | ||
* 'mocha-junit-reporter' | ||
* | ||
* Fill this stub out by replacing all the `any` types. | ||
* | ||
* Once filled out, we encourage you to share your work with the | ||
* community by sending a pull request to: | ||
* https://github.com/flowtype/flow-typed | ||
*/ | ||
|
||
declare module 'mocha-junit-reporter' { | ||
declare module.exports: any; | ||
} | ||
|
||
/** | ||
* We include stubs for each file inside this npm package in case you need to | ||
* require those files directly. Feel free to delete any files that aren't | ||
* needed. | ||
*/ | ||
declare module 'mocha-junit-reporter/test/helpers/mock-runner' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module 'mocha-junit-reporter/test/helpers/mock-test' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module 'mocha-junit-reporter/test/mocha-junit-reporter-spec' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module 'mocha-junit-reporter/test/mock-results' { | ||
declare module.exports: any; | ||
} | ||
|
||
// Filename aliases | ||
declare module 'mocha-junit-reporter/index' { | ||
declare module.exports: $Exports<'mocha-junit-reporter'>; | ||
} | ||
declare module 'mocha-junit-reporter/index.js' { | ||
declare module.exports: $Exports<'mocha-junit-reporter'>; | ||
} | ||
declare module 'mocha-junit-reporter/test/helpers/mock-runner.js' { | ||
declare module.exports: $Exports<'mocha-junit-reporter/test/helpers/mock-runner'>; | ||
} | ||
declare module 'mocha-junit-reporter/test/helpers/mock-test.js' { | ||
declare module.exports: $Exports<'mocha-junit-reporter/test/helpers/mock-test'>; | ||
} | ||
declare module 'mocha-junit-reporter/test/mocha-junit-reporter-spec.js' { | ||
declare module.exports: $Exports<'mocha-junit-reporter/test/mocha-junit-reporter-spec'>; | ||
} | ||
declare module 'mocha-junit-reporter/test/mock-results.js' { | ||
declare module.exports: $Exports<'mocha-junit-reporter/test/mock-results'>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.