feat: Basic Crud #70
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Checks | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Ensure Code Builds | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: NPM Install | |
run: npm install --only-dev | |
lint: | |
runs-on: ubuntu-latest | |
name: Checking Linting | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: NPM Install | |
run: npm install --only-dev | |
- name: Check for Linting Issues | |
run: npm run lint | |
format: | |
runs-on: ubuntu-latest | |
name: Checking Formatting | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: NPM Install | |
run: npm install | |
- name: Check for Formatting Issues | |
run: npm run format | |
unit-tests: | |
runs-on: ubuntu-latest | |
name: Run Unit Tests | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: NPM Install | |
run: npm install | |
- name: Run Unit Tests | |
run: npm run test | |
- name: Determine Coverage | |
uses: ArtiomTr/jest-coverage-report-action@v2 | |
id: coverage | |
with: | |
output: report-markdown | |
- name: Display Coverage Results | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
message: ${{ steps.coverage.outputs.report }} | |
e2e-tests: | |
runs-on: ubuntu-latest | |
services: | |
mongodb: | |
image: mongo | |
ports: | |
- 27017:27017 | |
name: Run E2E Testing | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: NPM Install | |
run: npm install | |
- name: Run E2E Tests | |
run: npm run test:e2e | |
docker-build: | |
runs-on: ubuntu-latest | |
name: Build Docker Image | |
needs: [ build ] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Verify Docker Build | |
uses: docker/build-push-action@v3 | |
with: | |
push: false |