mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Add ci to run bun test
This commit is contained in:
parent
1c8571e406
commit
7fb23bb490
47
.github/workflows/api-test.yml
vendored
Normal file
47
.github/workflows/api-test.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
name: Tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- next
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test api
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:15
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: kyoo
|
||||||
|
POSTGRES_PASSWORD: password
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: oven-sh/setup-bun@v2
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: ./api
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
working-directory: ./api
|
||||||
|
run: bun test
|
||||||
|
env:
|
||||||
|
JWT_SECRET: "TODO"
|
||||||
|
POSTGRES_SERVER: localhost
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: results
|
||||||
|
path: auth/out
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user