Skip to content

Merge pull request #2 from bercivarga/feature/db-setup #8

Merge pull request #2 from bercivarga/feature/db-setup

Merge pull request #2 from bercivarga/feature/db-setup #8

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches:
- main
- staging
push:
branches:
- main
- staging
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 20.x
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test
- name: Run eslint
run: npx eslint . --max-warnings=0
- name: Run prettier check
run: npx prettier --check .
- name: Fail if ESLint or Prettier found errors
run: |
if [ $? -ne 0 ]; then
echo "ESLint or Prettier found errors. Exiting..."
exit 1
fi