Skip to content

[Snyk] Upgrade: , , #32

[Snyk] Upgrade: , ,

[Snyk] Upgrade: , , #32

Workflow file for this run

name: CI/CD for NestJS
on:
push:
branches:
- main
- dev
- staging
pull_request:
branches:
- main
- dev
- staging
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Coverage
run: npm run test:cov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: WorldEngines/system-service
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
flags: smart-tests
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{matrix.node-version}}
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node-version}}
- name: Install dependencies
run: npm install
- name: Build
run: npm run build --if-present
deploy:
needs: build
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Slack Notification
uses: act10ns/slack@v1
with:
status: starting
channel: '#github-notifications'
message: Starting Deployment...
if: always()
- name: Checkout repository
uses: actions/checkout@v2
- name: Slack Notification
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
channel: '#github-notifications'
message: Deployed {{ env.GITHUB_REF_NAME }} branch status :${{job.status}}
if: always()