Skip to content

Commit

Permalink
add fix vulnerability & build app in circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
nil2022 committed Jan 12, 2024
1 parent 6352002 commit c5bf552
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# CircleCI workflow config file
version: 2.1

orbs:
node: circleci/[email protected]

jobs:
build_and_test:
check-node-version:
executor: node/default
steps:
- checkout
Expand All @@ -13,9 +14,26 @@ jobs:
- run:
command: node -v
name: Check Node.js Version
# - run:
# command: yarn build
# name: Build app

check-vulnerabilities:
executor: node/default
steps:
- checkout
- node/install-packages:
pkg-manager: npm
- run:
command: npm audit fix --force --json
name: Fix Vulnerabilities

build-app:
executor: node/default
steps:
- checkout
- node/install-packages:
pkg-manager: npm
- run:
command: npm install
name: Build app
# - persist_to_workspace:
# root: ~/project
# paths:
Expand All @@ -30,9 +48,11 @@ jobs:
# force: true # force push when pushing to the heroku remote, see: https://devcenter.heroku.com/articles/git

workflows:
test_my_app:
check-fix-build-app:
jobs:
- build_and_test
- check-node-version
- check-vulnerabilities
- build-app
# - deploy:
# requires:
# - build_and_test # only deploy if the build_and_test job has completed
Expand Down

0 comments on commit c5bf552

Please sign in to comment.