From febb2116d9bae9acd714ac80b851e1e79c95088c Mon Sep 17 00:00:00 2001 From: Tobias Maier Date: Sun, 24 Sep 2023 15:13:01 +0000 Subject: [PATCH] Testing gitea actions --- .gitea/workflows/release_actions.yaml | 41 ++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release_actions.yaml b/.gitea/workflows/release_actions.yaml index 056c0f1..bac7779 100644 --- a/.gitea/workflows/release_actions.yaml +++ b/.gitea/workflows/release_actions.yaml @@ -1 +1,40 @@ -name: Pull Request Created Action \ No newline at end of file +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