Testing gitea actions
This commit is contained in:
@@ -1 +1,40 @@
|
||||
name: Pull Request Created Action
|
||||
name: Build Project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, dev ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-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
|
||||
uses: cargo install sqlx-cli && sqlx migrate run
|
||||
- name: Running cargo build
|
||||
run: cargo build --release
|
||||
|
||||
Reference in New Issue
Block a user