Skip to content

refactor: change update-note endpoint return #59

refactor: change update-note endpoint return

refactor: change update-note endpoint return #59

Workflow file for this run

name: Backend Application API Build
on:
push:
branches: [ "main", "release" ]
pull_request:
branches: [ "main", "release" ]
jobs:
initialize-app:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18 ]
name: Cache Node dependencies
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install Packages
run: |
npm i
- name: Cache Node Modules
uses: actions/[email protected]
with:
path: ./node_modules
key: node-modules-app-cache-key.${{ github.ref }}.${{ github.sha }}
- name: Cache package-lock.json
uses: actions/[email protected]
with:
path: ./package-lock.json
key: package-lock-app-cache-key.${{ github.ref }}.${{ github.sha }}
test-and-lint:
runs-on: ubuntu-latest
needs: initialize-app
if: ${{ (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/main') }}
strategy:
matrix:
node: [ 18 ]
name: Test And Linting NodeJS v${{ matrix.node }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Use Cached Node Modules
uses: actions/[email protected]
with:
path: ./node_modules
key: node-modules-app-cache-key.${{ github.ref }}.${{ github.sha }}
- name: Use Cached package-lock.json
uses: actions/[email protected]
with:
path: ./package-lock.json
key: package-lock-app-cache-key.${{ github.ref }}.${{ github.sha }}
- name: Linting
run: |
npm run linting
- name: Testing
run: |
npm run test
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Coverage Report
uses: actions/[email protected]
with:
path: ./coverage
key: coverage-app-cache-key.${{ github.ref }}.${{ github.sha }}
analyze-code:
runs-on: ubuntu-latest
needs: test-and-lint
if: ${{ (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/main') }}
name: Sonar Cloud Scan
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Cached Coveraged Report
uses: actions/[email protected]
with:
path: ./coverage
key: coverage-app-cache-key.${{ github.ref }}.${{ github.sha }}
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}