Skip to content

chore: update jest and typescript config files #28

chore: update jest and typescript config files

chore: update jest and typescript config files #28

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: |
cd backend
npm i
- name: Cache Node Modules
uses: actions/[email protected]
with:
path: ./backend/node_modules
key: node-modules-app-cache-key.${{ github.ref }}.${{ github.sha }}
- name: Cache package-lock.json
uses: actions/[email protected]
with:
path: ./backend/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
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Use Cached Node Modules
uses: actions/[email protected]
with:
path: ./backend/node_modules
key: node-modules-app-cache-key.${{ github.ref }}.${{ github.sha }}
- name: Use Cached package-lock.json
uses: actions/[email protected]
with:
path: ./backend/package-lock.json
key: package-lock-app-cache-key.${{ github.ref }}.${{ github.sha }}
- name: Linting
run: |
cd backend
npm run linting
- name: Testing
run: |
cd backend
npm run test
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}