Files
iot-cloud-api/.gitea/workflows/test_build.yaml
Tobias Maier ae005867e7
All checks were successful
Build and Test Project / test (pull_request) Successful in 6m30s
fi8x
2025-10-17 16:15:07 +00:00

37 lines
842 B
YAML

name: Build and Test Project
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
container:
image: rust:latest
services:
db:
image: postgres:latest
env:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
POSTGRES_DB: iot
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Install necessary dependencies
run: apt update && apt install nodejs pkg-config -y
- name: Checkout Code
uses: actions/checkout@v2
- name: Run migrations
run: cargo install sqlx-cli && sqlx migrate run
- name: Running cargo build
run: cargo build --release
- name: Running cargo build
run: cargo test