Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds CI job for system checks #52

Merged
merged 12 commits into from
Nov 20, 2023
24 changes: 11 additions & 13 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
workflow_call:

jobs:
api-status:
name: API Status
system-checks:
name: System Checks
runs-on: ubuntu-latest

steps:
Expand All @@ -18,19 +18,17 @@ jobs:
- name: Load image
run: docker load --input /tmp/test-image.tar

- name: Check API health
- name: Run project checks
uses: addnab/docker-run-action@v3
with:
image: test-image
run: |
endpoint="http://localhost:8000/health"
httpstatus=$(curl --silent --output /dev/null --write-out "%{http_code}" $endpoint)

# If the status is not 200, print the full status report from the endpoint
if [ "$httpstatus" -ne 200 ]; then
curl $endpoint
exit 1
fi
run: keystone-api check

- name: Run migration checks
uses: addnab/docker-run-action@v3
with:
image: test-image
run: keystone-api makemigrations --check

app-tests:
name: Application Tests
Expand All @@ -51,7 +49,7 @@ jobs:
report-test-status:
name: Report Test Status
runs-on: ubuntu-latest
needs: [ api-status, app-tests ]
needs: [ app-tests, system-checks ]
if: always()

steps:
Expand Down
29 changes: 29 additions & 0 deletions keystone_api/apps/users/migrations/0002_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 4.2.5 on 2023-11-19 18:34

import django.contrib.auth.models
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
('users', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='Group',
fields=[
],
options={
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('auth.group',),
managers=[
('objects', django.contrib.auth.models.GroupManager()),
],
),
]
Loading