ci: combine workflows
Some checks failed
Build and Push Docker Image / build (push) Failing after 32s
Some checks failed
Build and Push Docker Image / build (push) Failing after 32s
This commit is contained in:
parent
079ae7791c
commit
905fc81c8d
@ -6,11 +6,24 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
|
||||||
uses: ./.gitea/workflows/test.yaml
|
|
||||||
build:
|
build:
|
||||||
needs: [tests]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:17-alpine
|
||||||
|
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -25,6 +38,16 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install
|
run: bun install
|
||||||
|
|
||||||
|
- name: Push Database - Test
|
||||||
|
run: bun run db:push
|
||||||
|
env:
|
||||||
|
POSTGRES_URL: postgres://postgres:postgres@postgres:5432/postgres
|
||||||
|
|
||||||
|
- name: Test API
|
||||||
|
run: bun test:api
|
||||||
|
env:
|
||||||
|
POSTGRES_URL: postgres://postgres:postgres@postgres:5432/postgres
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bun run build
|
run: bun run build
|
||||||
env:
|
env:
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
name: Test
|
|
||||||
run-name: ${{ gitea.actor }}
|
|
||||||
on: [workflow_call]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:17-alpine
|
|
||||||
|
|
||||||
env:
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_DB: postgres
|
|
||||||
|
|
||||||
options: >-
|
|
||||||
--health-cmd pg_isready
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Use Bun
|
|
||||||
uses: oven-sh/setup-bun@v2
|
|
||||||
with:
|
|
||||||
bun-version: 1.1.29
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: bun install
|
|
||||||
|
|
||||||
- name: Push Database
|
|
||||||
run: bun run db:push
|
|
||||||
env:
|
|
||||||
POSTGRES_URL: postgres://postgres:postgres@postgres:5432/postgres
|
|
||||||
|
|
||||||
- name: Test API
|
|
||||||
run: bun test:api
|
|
||||||
env:
|
|
||||||
POSTGRES_URL: postgres://postgres:postgres@postgres:5432/postgres
|
|
Loading…
Reference in New Issue
Block a user