Skip to content

Commit

Permalink
Merge pull request #2 from Smoothex/main
Browse files Browse the repository at this point in the history
Project maintenance
  • Loading branch information
Smoothex authored May 29, 2024
2 parents 1ee8727 + c10d3d2 commit d587338
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: test
IMAGE_TAG: testtag
IMAGE_TAG: build-${{ github.run_id }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit and integration tests
name: Integration tests

on:
push:
Expand All @@ -7,42 +7,7 @@ on:
branches: [ "main" ]

jobs:
unit-tests:
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_DB: routing
PYTHONFAULTHANDLER: 1
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true

- name: Checkout LFS objects (map files)
run: git lfs checkout

- name: Set up Python 3.9.16
uses: actions/setup-python@v3
with:
python-version: 3.9.16

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./routing
pip install -r requirements.txt
- name: Run unit tests
run: |
cd routing
python -m unittest -v
integration-tests:
needs: [unit-tests]
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Unit tests

on:
push:
branches: [ "*" ]
pull_request:
branches: [ "main" ]

jobs:
unit-tests:
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_DB: routing
PYTHONFAULTHANDLER: 1
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true

- name: Checkout LFS objects (map files)
run: git lfs checkout

- name: Set up Python 3.9.16
uses: actions/setup-python@v3
with:
python-version: 3.9.16

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./routing
pip install -r requirements.txt
- name: Run unit tests
run: |
cd routing
python -m unittest -v
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
![Unit and integration tests](https://github.com/Smoothex/erzmobil-routing/actions/workflows/tests.yml/badge.svg)
[![Unit tests](https://github.com/Smoothex/erzmobil-routing/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/Smoothex/erzmobil-routing/actions/workflows/unit-tests.yml)
[![Integration tests](https://github.com/Smoothex/erzmobil-routing/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/Smoothex/erzmobil-routing/actions/workflows/integration-tests.yml)
[![Build and push image to AWS ECR](https://github.com/Smoothex/erzmobil-routing/actions/workflows/build-and-push.yml/badge.svg)](https://github.com/Smoothex/erzmobil-routing/actions/workflows/build-and-push.yml)

![Image build](https://github.com/Smoothex/erzmobil-routing/actions/workflows/build-and-push.yml/badge.svg)

# bUSnow-routing
# Routing component of Mobility platform

In dieser Datei soll skizziert werden, wie die Entwicklung des Routing-Service abläuft (Stand 07/2023).

Expand Down

0 comments on commit d587338

Please sign in to comment.