Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
284 changes: 283 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ workflows:
# Inside the workflow, you provide the jobs you want to run, e.g this workflow runs the build-and-test job above.
# CircleCI will run this workflow on every commit.
# For more details on extending your workflow, see the configuration docs: https://circleci.com/docs/2.0/configuration-reference/#workflows
sample:
run-tests:
jobs:
- test:
pkg-manager: yarn
test-results-for: jest
override-ci-command: "yarn install"
run-command: "test:unit"
- e2e-test:
pkg-manager: yarn
test-results-for: jest
override-ci-command: "yarn install"
run-command: "test:unit"
# For running simple node tests, you could optionally instead use the node/test job from the orb to replicate and replace the manually defined "test" job above in fewer lines.
# - node/test

Expand Down Expand Up @@ -555,6 +560,283 @@ jobs:
ORB_PARAM_YARN_RUN: <<parameters.yarn-run>>
name: Run <<parameters.pkg-manager>> <<parameters.npm-run>>
working_directory: <<parameters.app-dir>>
e2e-test:
description: |
Simple drop-in job to test your Node.js application automatically.
executor:
name: default
resource_class: << parameters.resource_class >>
tag: << parameters.version >>
parameters:
app-dir:
default: ~/project
description: Path to the directory containing your package.json file. Not needed if package.json lives in the root.
type: string
cache-version:
default: v1
description: Change the default cache version if you need to clear the cache for any reason.
type: string
override-ci-command:
default: ""
description: |
By default, packages will be installed with "npm ci" or "yarn install --frozen-lockfile".
Optionally supply a custom package installation command, with any additional flags needed.
type: string
pkg-manager:
default: npm
description: Select the default node package manager to use.
enum:
- npm
- yarn
- yarn-berry
type: enum
resource_class:
default: large
description: Configure the executor resource class
enum:
- small
- medium
- medium+
- large
- xlarge
- 2xlarge
- 2xlarge+
type: enum
run-command:
default: test
description: The name of the script within your package.json which will run your tests.
type: string
setup:
default: []
description: Provide any optional steps you would like to run prior to installing the node dependencies. This is a good place to install global modules.
type: steps
test-results-for:
default: other
description: |
Testing framework your project uses.
If this is set to jest or mocha, test results will be automatically produced. When using jest, the jest-junit package is required as a dev dependency. See https://github.com/jest-community/jest-junit for more information.
When using mocha, the mocha-junit-reporter and mocha-multi packages are required as dev dependency. See https://github.com/michaelleeallen/mocha-junit-reporter and https://github.com/glenjamin/mocha-multi for more information.
enum:
- jest
- mocha
- other
type: enum
test-results-path:
default: ""
description: |
If you use test-results-for, this will be configured automatically.
If you configure test results yourself (for example in your node config files) set this to the location that you write them to, and they will be uploaded.
type: string
version:
default: lts
description: |
Pick a specific cimg/node image version tag: https://hub.docker.com/r/cimg/node
type: string
steps:
- checkout
- steps: << parameters.setup >>
- install-packages:
app-dir: <<parameters.app-dir>>
cache-version: <<parameters.cache-version>>
override-ci-command: <<parameters.override-ci-command>>
pkg-manager: <<parameters.pkg-manager>>
- when:
condition:
and:
- equal:
- npm
- << parameters.pkg-manager >>
- equal:
- other
- << parameters.test-results-for >>
steps:
- run:
command: npm run <<parameters.run-command>>
name: Run NPM Tests
working_directory: <<parameters.app-dir>>
- when:
condition:
and:
- equal:
- npm
- << parameters.pkg-manager >>
- equal:
- jest
- << parameters.test-results-for >>
steps:
- run:
command: npm list jest-junit || (echo "Add the package jest-junit to the dev dependencies of your project with `npm install --save-dev jest-junit`" && exit 1)
name: Check for test reporter
working_directory: <<parameters.app-dir>>
- run:
command: npm run <<parameters.run-command>> -- --reporters=default --reporters=jest-junit
name: Run NPM Tests
working_directory: <<parameters.app-dir>>
- when:
condition:
and:
- equal:
- npm
- << parameters.pkg-manager >>
- equal:
- mocha
- << parameters.test-results-for >>
steps:
- run:
command: npm list mocha-junit-reporter mocha-multi || (echo "Add the packages mocha-junit-reporter & mocha-multi to the dev dependencies of your project with `npm install --save-dev mocha-junit-reporter mocha-multi`" && exit 1)
name: Check for test reporter
working_directory: <<parameters.app-dir>>
- run:
command: npm run <<parameters.run-command>> -- --reporter mocha-multi --reporter-options spec=-,mocha-junit-reporter=-
name: Run NPM Tests
working_directory: <<parameters.app-dir>>
- when:
condition:
and:
- equal:
- yarn
- << parameters.pkg-manager >>
- equal:
- other
- << parameters.test-results-for >>
steps:
- run:
command: yarn run <<parameters.run-command>>
name: Run YARN Tests
working_directory: <<parameters.app-dir>>
- when:
condition:
and:
- equal:
- yarn
- << parameters.pkg-manager >>
- equal:
- jest
- << parameters.test-results-for >>
- << pipeline.git.base_revision >>

steps:
- run:
command: yarn list --pattern jest-junit | grep " jest-junit@" || (echo "Add the package jest-junit to your projects dev dependencies with `yarn add --dev jest-junit`" && exit 1)
name: Check for test reporter
working_directory: <<parameters.app-dir>>
- run:
command: yarn run <<parameters.run-command>> --reporters=default --reporters=jest-junit --changedSince << pipeline.git.base_revision >>
name: Run YARN Tests
working_directory: <<parameters.app-dir>>
- when:
condition:
and:
- equal:
- yarn
- << parameters.pkg-manager >>
- equal:
- jest
- << parameters.test-results-for >>
- not: << pipeline.git.base_revision >>

steps:
- run:
command: yarn list --pattern jest-junit | grep " jest-junit@" || (echo "Add the package jest-junit to your projects dev dependencies with `yarn add --dev jest-junit`" && exit 1)
name: Check for test reporter
working_directory: <<parameters.app-dir>>
- run:
command: yarn run <<parameters.run-command>> --reporters=default --reporters=jest-junit
name: Run YARN Tests
working_directory: <<parameters.app-dir>>
- when:
condition:
and:
- equal:
- yarn
- << parameters.pkg-manager >>
- equal:
- mocha
- << parameters.test-results-for >>
steps:
- run:
command: yarn list --pattern "mocha-junit-reporter|mocha-multi" | grep "mocha-junit-reporter@\|mocha-multi@" || (echo "Add the packages mocha-junit-reporter & mocha-multi to the dev dependencies of your project with `yarn add --dev mocha-junit-reporter mocha-multi`" && exit 1)
name: Check for test reporter
working_directory: <<parameters.app-dir>>
- run:
command: yarn run <<parameters.run-command>> --reporter mocha-multi --reporter-options spec=-,mocha-junit-reporter=-
name: Run YARN Tests
working_directory: <<parameters.app-dir>>
- when:
condition:
and:
- equal:
- yarn-berry
- << parameters.pkg-manager >>
- equal:
- other
- << parameters.test-results-for >>
steps:
- run:
command: yarn run <<parameters.run-command>>
name: Run YARN 2.x Tests
working_directory: <<parameters.app-dir>>
- when:
condition:
and:
- equal:
- yarn-berry
- << parameters.pkg-manager >>
- equal:
- jest
- << parameters.test-results-for >>
steps:
- run:
command: yarn run <<parameters.run-command>> --reporters=default --reporters=jest-junit
name: Run YARN 2.x Tests
working_directory: <<parameters.app-dir>>
- when:
condition:
and:
- equal:
- yarn-berry
- << parameters.pkg-manager >>
- equal:
- mocha
- << parameters.test-results-for >>
steps:
- run:
command: yarn list --pattern "mocha-junit-reporter|mocha-multi" | grep "mocha-junit-reporter@\|mocha-multi@" || (echo "Add the packages mocha-junit-reporter & mocha-multi to the dev dependencies of your project with `yarn add --dev mocha-junit-reporter mocha-multi`" && exit 1)
name: Check for test reporter
working_directory: <<parameters.app-dir>>
- run:
command: yarn run <<parameters.run-command>> --reporter mocha-multi --reporter-options spec=-,mocha-junit-reporter=-
name: Run YARN 2.x Tests
working_directory: <<parameters.app-dir>>
- when:
condition: << parameters.test-results-path >>
steps:
store_test_results:
path: << parameters.test-results-path >>
- when:
condition:
and:
- equal:
- jest
- << parameters.test-results-for >>
- equal:
- ""
- << parameters.test-results-path >>
steps:
store_test_results:
path: <<parameters.app-dir>>/junit.xml
- when:
condition:
and:
- equal:
- mocha
- << parameters.test-results-for >>
- equal:
- ""
- << parameters.test-results-path >>
steps:
store_test_results:
path: <<parameters.app-dir>>/test-results.xml
test:
description: |
Simple drop-in job to test your Node.js application automatically.
Expand Down
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ ion-menu.md ion-list#inbox-list ion-list-header {
}

ion-menu.md ion-list#labels-list ion-list-header {
font-size: 16px;
font-size: 14px;

margin-bottom: 18px;

Expand Down Expand Up @@ -191,4 +191,4 @@ ion-note {
ion-item.selected {
--color: var(--ion-color-primary);
}
</style>
</style>