Files
iot-cloud-api/.gitea/workflows/release_actions.yaml
Tobias Maier bed42aaeb1
All checks were successful
Build Project / test (push) Successful in 5m14s
now runs on rust
2023-09-24 15:16:40 +00:00

44 lines
1.0 KiB
YAML

name: Build Project
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
container:
image: rust:latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
db:
# Docker Hub image
image: postgres:latest
# Provide the password for postgres
env:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
POSTGRES_DB: iot
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- run: apt update && apt install nodejs -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