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
60 changes: 24 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,30 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

workflows:
version: 2
build:
jobs:
- build

jobs:
build:
working_directory: ~/mern-starter
save_hello_world_output:
docker:
- image: circleci/node:10.16.3
- image: mongo:4.2.0
- image: circleci/node:13.8.0
steps:
- checkout
- run:
name: update-npm
command: 'sudo npm install -g npm@5'
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: install-npm-wee
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run: echo "hello world" > ~/output.txt
- persist_to_workspace:
root: ~/
paths:
- ./node_modules
- run:
name: test
command: npm test
- run:
name: code-coverage
command: './node_modules/.bin/nyc report --reporter=text-lcov'
- store_artifacts:
path: test-results.xml
prefix: tests
- store_artifacts:
path: coverage
prefix: coverage
- store_test_results:
path: test-results.xml
- output.txt

print_output_file:
docker:
- image: circleci/node:13.8.0
steps:
- attach_workspace:
at: ~/
- run: cat ~/output.txt

workflows:
my_workflow:
jobs:
- save_hello_world_output
- print_output_file:
requires:
- save_hello_world_output
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,4 @@ This warning is visible only on development and totally harmless. This occurs to

## License
MERN is released under the [MIT License](http://www.opensource.org/licenses/MIT).
##hello world for testing circleci with github--