Test
Some checks failed
Build Project / test (push) Failing after 6m9s

This commit is contained in:
2025-02-06 17:27:59 +00:00
parent 31b90e223f
commit 0257434b26
8 changed files with 60 additions and 41 deletions

View File

@@ -5,20 +5,14 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: rust:bullseye
# Service containers to run with `container-job`
image: rust:latest
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
@@ -43,14 +37,22 @@ jobs:
- name: Log in to Docker Registry
uses: docker/login-action@v1
with:
registry: gitea.maiertobi.de # Replace with your Docker registry URL
registry: gitea.maiertobi.de
username: tobimai
password: ${{ secrets.docker_registry_key }}
- name: Extract Version from Cargo.toml
id: cargo_version
run: |
VERSION=$(grep '^version' Cargo.toml | head -n 1 | cut -d ' ' -f 3 | tr -d '"')
echo "VERSION=$VERSION" >> $GITEA_ENV
- name: Test
run: echo $VERSION
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: gitea.maiertobi.de/tobimai/iot # Replace with your Docker image's details
tags: gitea.maiertobi.de/tobimai/iot:$VERSION

View File

@@ -6,19 +6,13 @@ jobs:
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