Add private and onlyOwn flags to expense groupings #402
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: Test Bookkeper | |
on: [workflow_dispatch, push] | |
jobs: | |
build: | |
name: Build and test bookkeeper | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:14.3 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 15488:5432 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: 1.0.8 | |
- name: Install deps | |
run: bun install | |
- name: Setup CI env | |
run: cp .env.ci .env | |
- name: Setup database | |
run: | | |
bun migrate | |
bun seed | |
- name: Lint | |
run: bun lint | |
- name: Build client | |
run: bun build-client | |
- name: Build server | |
run: bun build-server | |
- name: Start server | |
run: ./script/start-server.sh | |
- name: Run tests | |
run: bun test | |
- name: Dump server logs if tests failed | |
if: failure() | |
run: | | |
echo "Tests failed, dumping server logs" | |
cat log/server.log | bun pretty-log | |
- name: Report build status to Slack | |
if: ${{ failure() && github.ref_name == 'master' }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_COLOR: ${{ job.status }} | |