72 lines
1.4 KiB
YAML
72 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Bun
|
|
run: |
|
|
curl -fsSL https://bun.sh/install | bash
|
|
echo "$HOME/.bun/bin" >> $GITHUB_PATH
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Lint
|
|
run: bun run lint
|
|
|
|
- name: Test
|
|
run: bun run test
|
|
|
|
e2e:
|
|
runs-on: ubuntu-latest
|
|
needs: ci
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
env:
|
|
POSTGRES_USER: lunarfront
|
|
POSTGRES_PASSWORD: lunarfront
|
|
POSTGRES_DB: postgres
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 5s
|
|
--health-timeout 3s
|
|
--health-retries 5
|
|
|
|
valkey:
|
|
image: valkey/valkey:8
|
|
options: >-
|
|
--health-cmd "valkey-cli ping"
|
|
--health-interval 5s
|
|
--health-timeout 3s
|
|
--health-retries 5
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Bun
|
|
run: |
|
|
curl -fsSL https://bun.sh/install | bash
|
|
echo "$HOME/.bun/bin" >> $GITHUB_PATH
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Run API tests
|
|
working-directory: packages/backend
|
|
run: bun run api-test
|