Skip to content

Commit

Permalink
Merge pull request #590 from kuzzleio/3.0.0-proposal
Browse files Browse the repository at this point in the history
3.0.0 proposal
  • Loading branch information
Aschen authored Nov 22, 2019
2 parents 2bd960e + 2d9afc6 commit 94c140c
Show file tree
Hide file tree
Showing 40 changed files with 1,820 additions and 1,481 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ dist
test/e2e/test-error.png
test/e2e/visual-regression/current
test/e2e/visual-regression/diff
test/e2e/failed-tests
test/e2e/falied-tests/
test/e2e/failed-tests/
test/e2e/videos
24 changes: 12 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
name: "Linter"
script:
- npm install
- npm run lint
- npm run test:lint

# ---------------------------------------
# Unit Testing
Expand All @@ -47,7 +47,7 @@ jobs:
name: "Unit Tests"
script:
- npm install
- npm run unit
- npm run test:unit

after_script:
- npm run codecov
Expand All @@ -66,7 +66,7 @@ jobs:

script:
- npm install
- CYPRESS_RETRIES=5 npm run e2e
- CYPRESS_RETRIES=5 npm run test:e2e

# ---------------------------------------
# Regular Build & Deploy
Expand All @@ -76,7 +76,7 @@ jobs:
- stage: build & deploy
name: "Build & Deploy to console.kuzzle.io"

if: type != pull_request && branch = master
if: type != pull_request && branch =~ ^([0-9]+-stable|master)$

addons:
apt:
Expand All @@ -93,19 +93,19 @@ jobs:

deploy:
provider: script
script: ~/.local/bin/aws s3 sync dist s3://$AWS_S3_BUCKET_PROD --delete
script: ~/.local/bin/aws s3 sync dist s3://$AWS_S3_BUCKET_PROD/kuzzle-v2 --delete
skip_cleanup: true

after_deploy:
- aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_DISTRIBUTION_ID_PROD --paths "/*"
- aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_DISTRIBUTION_ID_PROD --paths "/kuzzle-v2/*"

# ---------------------------------------
# next.console.kuzzle.io
# ---------------------------------------
- stage: build & deploy
name: "Build & Deploy to next.console.kuzzle.io"
name: "Build & Deploy to next-console.kuzzle.io"

if: type != pull_request && branch =~ ^.[1-9]*-dev$
if: type != pull_request && branch =~ ^.[0-9]+-dev$

addons:
apt:
Expand All @@ -122,21 +122,21 @@ jobs:

deploy:
provider: script
script: ~/.local/bin/aws s3 sync dist s3://$AWS_S3_BUCKET_DEV/kuzzle-v1 --delete
script: ~/.local/bin/aws s3 sync dist s3://$AWS_S3_BUCKET_DEV/kuzzle-v2 --delete
skip_cleanup: true
on:
all_branches: true

after_deploy:
- aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_DISTRIBUTION_ID_DEV --paths "/kuzzle-v1/*"
- aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_DISTRIBUTION_ID_DEV --paths "/kuzzle-v2/*"

# ---------------------------------------
# Github release and s3 deployment
# ---------------------------------------
- stage: build & deploy
name: "Package and Share release"

if: type != pull_request && branch = master
if: type != pull_request && branch =~ ^([0-9]+-stable|master)$

addons:
apt:
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
bucket: $AWS_S3_BUCKET_DL
region: us-west-2
skip_cleanup: true
upload-dir: admin-console
upload-dir: admin-console/kuzzle-v2
local-dir: deploy

after_deploy:
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,22 +436,22 @@ npm test
This executes both unit and end-to-end tests. To run only the unit-tests, run

```
npm run unit
npm run test:unit
```

### End-to-end

To run the end-to-end tests in headless mode, run

```
npm run e2e
npm run test:e2e
```

To run the end-to-end tests in headful mode, run

```
npm run dev
npm run e2e-local
npm run test:e2e-local
```

We use Cypress.io to e2e test the UI. You can use it locally (via the local dashboard) or in the CI (using the cloud-hosted dashboard). Cypress is an awesome tool, but this has a price. They had to re-invent a little bit the wheel so, even if writing and running tests looks extremely smooth, it is still recommended to understand _how_ this magic is achieved. Before writing tests, you are encouraged to read the following docs:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ npm test
This executes both unit and end-to-end tests. To run only the unit-tests, run

```
npm run unit
npm run test:unit
```

To run the end-to-end tests in headless mode, run

```
npm run e2e
npm run test:e2e
```

To run the end-to-end tests in headful mode, run

```
npm run dev
npm run e2e-local
npm run test:e2e-local
```

Please refer to the CONTRIBUTING file to learn more about how to write code and tests for this project.
Loading

0 comments on commit 94c140c

Please sign in to comment.