Skip to content

Refactor/linus code review #90

Refactor/linus code review

Refactor/linus code review #90

name: Rememberry Backend CI
on:
pull_request:
paths:
- "backend/**"
- ".github/workflows/integration-backend.yml"
branches: [master]
defaults:
run:
working-directory: backend
jobs:
lint-format:
name: lint and format
runs-on: ubuntu-20.04
steps:
- name: checkout code
uses: actions/checkout@v4
- name: get pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: get node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: install dependencies
run: pnpm --filter=backend -config.-dedupe-peer-dependents=false i --frozen-lockfile
- name: lint
run: pnpm run backend lint
- name: check formatting
run: |
if ! pnpm run format-check ; then
echo "Please format the code by running: pnpm run format"
exit 1
fi
test:
name: test
runs-on: ubuntu-22.04
steps:
- name: checkout code
uses: actions/checkout@v4
- name: get pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: get node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: install dependencies
run: pnpm --filter=backend -config.-dedupe-peer-dependents=false i --frozen-lockfile
- name: test
run: pnpm run backend test
build:
name: build
runs-on: ubuntu-22.04
steps:
- name: checkout code
uses: actions/checkout@v4
- name: get pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: get node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: install dependencies
run: pnpm --filter=backend -config.-dedupe-peer-dependents=false i --frozen-lockfile
- name: get bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.1.0
- name: build
run: pnpm run backend build