Skip to content

Commit

Permalink
reverted a few outdated lines
Browse files Browse the repository at this point in the history
  • Loading branch information
why-not-try-calmer committed Aug 2, 2023
1 parent d022863 commit 71d6982
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 63 deletions.
81 changes: 44 additions & 37 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,48 +17,55 @@ jobs:
OGCAPIF_HOST: localhost

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
if: github.repository == 'opengisch/django-ogcapif'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to DockerHub
if: github.repository == 'opengisch/django-ogcapif'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Django image
uses: docker/build-push-action@v4
with:
context: .
provenance: false
file: docker/django/Dockerfile
push: ${{ github.repository == 'opengisch/django-ogcapif' }}
pull: true
cache-from: type=registry,ref=opengisch/signalo-django:latest
cache-to: type=registry,ref=opengisch/signalo-django:latest,mode=max
tags: opengisch/signalo-django:latest
- name: Build Django image
uses: docker/build-push-action@v4
with:
context: .
provenance: false
file: docker/django/Dockerfile
push: ${{ github.repository == 'opengisch/django-ogcapif' }}
pull: true
cache-from: type=registry,ref=opengisch/signalo-django:latest
cache-to: type=registry,ref=opengisch/signalo-django:latest,mode=max
tags: opengisch/signalo-django:latest

- name: Setup Compose & run all tests
run: |
# copy default conf
cp .env.example .env
- name: Setup Compose
run: |
# copy default conf
cp .env.example .env
# start the stack
docker compose up --build -d
# start the stack
docker compose up --build -d
# deploy static files and migrate database
docker compose exec django python manage.py collectstatic --no-input
docker compose exec django python manage.py migrate --no-input
# deploy static files and migrate database
docker compose exec django python manage.py collectstatic --no-input
docker compose exec django python manage.py migrate --no-input
docker-compose exec -T django python manage.py populate_users
docker-compose exec -T django python manage.py populate_vl
docker-compose exec -T django python manage.py populate_signs_poles
# run tests
docker compose exec django python manage.py test signalo.value_lists
docker compose exec django python manage.py test signalo.core
docker compose exec django python manage.py test signalo.edge_cases
docker compose exec django python manage.py test signalo.roads
- name: Run unit tests
run: |
docker compose exec django python manage.py test signalo.value_lists
docker compose exec django python manage.py test signalo.core
docker compose exec django python manage.py test signalo.edge_cases
docker compose exec django python manage.py test signalo.roads
- name: Failure logs
if: failure()
run: docker-compose logs
- name: Run integration tests
run: docker compose run integration_tests

- name: Failure logs
if: failure()
run: docker-compose logs
9 changes: 2 additions & 7 deletions src/signalo/roads/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Generated by Django 4.2 on 2023-05-11 15:21
# Generated by Django 4.2 on 2023-05-12 14:13

import uuid

import computedfields.resolver
import django.contrib.gis.db.models.fields
from django.db import migrations, models

Expand All @@ -19,11 +18,7 @@ class Migration(migrations.Migration):
name='Road',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('geom', django.contrib.gis.db.models.fields.MultiLineStringField(srid=2056)),
('geom', django.contrib.gis.db.models.fields.MultiLineStringField(srid=2056, verbose_name='Geometry')),
],
options={
'abstract': False,
},
bases=(computedfields.resolver._ComputedFieldsModelBase, models.Model),
),
]
19 changes: 0 additions & 19 deletions src/signalo/roads/migrations/0002_alter_road_geom.py
Original file line number Diff line number Diff line change
@@ -1,19 +0,0 @@
# Generated by Django 4.2.1 on 2023-05-12 20:00

import django.contrib.gis.db.models.fields
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('signalo_roads', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='road',
name='geom',
field=django.contrib.gis.db.models.fields.MultiLineStringField(srid=2056, verbose_name='Geometry'),
),
]

0 comments on commit 71d6982

Please sign in to comment.