refactor: split item and transaction service #103
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: CI for item service | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- services/item/** | |
pull_request: | |
branches: | |
- main | |
paths: | |
- services/item/** | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: services/item | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install dependencies | |
run: bun install | |
- name: Lint with TSC | |
run: bun tsc | |
- name: Lint with ESLint | |
run: bun eslint . | |
format: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: services/item | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install dependencies | |
run: bun install | |
- name: Check format | |
run: bun prettier . --check | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: services/item | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install dependencies | |
run: bun install | |
- name: Build | |
run: bun run build | |
test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: services/item | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Start containers | |
run: docker compose -f docker-compose.test.yaml up -d --build | |
- name: Run unit tests | |
run: docker exec nshm-item-test-api-1 bun test unit.test.ts --coverage | |
- name: Run integration tests | |
run: docker exec nshm-item-test-api-1 bun test integration.test.ts --coverage |