Skip to content

Commit

Permalink
feat: snyk pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
DevRico003 committed Feb 28, 2024
1 parent ab5b593 commit 7f94221
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ on:
- main

jobs:
source:
build_test_security_notify:
runs-on: ubuntu-latest
environment: Production
steps:
- name: Checkout code
uses: actions/checkout@v3

build:
needs: source
runs-on: ubuntu-latest
environment: Production
steps:
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
Expand All @@ -28,22 +24,15 @@ jobs:
- name: Build
run: npm run build

test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Run tests
run: npm test

security_and_notify:
needs: test
runs-on: ubuntu-latest
steps:
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/[email protected]
with:
args: --severity-threshold=high
fail-on-issues: true

- name: Send failure notification
if: failure()
uses: dawidd6/action-send-mail@v3
Expand Down

0 comments on commit 7f94221

Please sign in to comment.