Add .circleci/config.yml
This commit is contained in:
parent
067c7bd718
commit
af2bd0b245
|
@ -2,41 +2,25 @@
|
||||||
# See: https://circleci.com/docs/2.0/configuration-reference
|
# See: https://circleci.com/docs/2.0/configuration-reference
|
||||||
version: 2.1
|
version: 2.1
|
||||||
|
|
||||||
orbs:
|
# Define a job to be invoked later in a workflow.
|
||||||
# The Node.js orb contains a set of prepackaged CircleCI configuration you can utilize
|
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
|
||||||
# Orbs reduce the amount of configuration required for common tasks.
|
|
||||||
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/node
|
|
||||||
node: circleci/node@4.7
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Below is the definition of your job to build and test your app, you can rename and customize it as you want.
|
say-hello:
|
||||||
build-and-test:
|
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
|
||||||
# These next lines define a Docker executor: https://circleci.com/docs/2.0/executor-types/
|
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
|
||||||
# You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
|
|
||||||
# A list of available CircleCI Docker Convenience Images are available here: https://circleci.com/developer/images/image/cimg/node
|
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/node:16.10
|
- image: cimg/base:stable
|
||||||
# Then run your tests!
|
# Add steps to the job
|
||||||
# CircleCI will report the results back to your VCS provider.
|
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code as the first step.
|
|
||||||
- checkout
|
- checkout
|
||||||
# Next, the node orb's install-packages step will install the dependencies from a package.json.
|
|
||||||
# The orb install-packages step will also automatically cache them for faster future runs.
|
|
||||||
- node/install-packages:
|
|
||||||
# If you are using yarn, change the line below from "npm" to "yarn"
|
|
||||||
pkg-manager: npm
|
|
||||||
- run:
|
- run:
|
||||||
name: Run tests
|
name: "Say hello"
|
||||||
command: npm test
|
command: "echo Hello, World!"
|
||||||
|
|
||||||
|
# Invoke jobs via workflows
|
||||||
|
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
|
||||||
workflows:
|
workflows:
|
||||||
# Below is the definition of your workflow.
|
say-hello-workflow:
|
||||||
# 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:
|
|
||||||
jobs:
|
jobs:
|
||||||
- build-and-test
|
- say-hello
|
||||||
# For running simple node tests, you could optionally use the node/test job from the orb to replicate and replace the job above in fewer lines.
|
|
||||||
# - node/test
|
|
||||||
|
|
Loading…
Reference in New Issue