Refactor/linus code review #92
Workflow file for this run
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: Rememberry Backend CI | |
on: | |
pull_request: | |
paths: | |
- "backend/**" | |
- ".github/workflows/integration-backend.yml" | |
branches: [master] | |
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 | |