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

Add missing migration & update workflows #175

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .github/stale.yml

This file was deleted.

10 changes: 4 additions & 6 deletions .github/workflows/monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@ jobs:

steps:
- name: "Checkout code"
uses: "actions/checkout@v3"
uses: actions/checkout@v4

- name: "Set up Python"
uses: "actions/setup-python@v2"
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: "Install requirements"
run: |
pip install beautifulsoup4
run: pip install beautifulsoup4

- name: "Check daily snapshots"
run: |
./monitoring/check_phpmyadmin_daily_snapshots.py
run: ./monitoring/check_phpmyadmin_daily_snapshots.py
62 changes: 36 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,39 @@ on:
- master

jobs:
test-python:
name: Test on python ${{ matrix.python-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Use python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: pip install -r requirements-test.txt
- name: Run the migrations
run: ./manage.py migrate
- name: Check missing migrations
run: ./manage.py makemigrations --check
- name: Run python checks
run: ./manage.py check
- name: Run python tests and coverage
run: coverage run --source=. ./manage.py test
- name: Send coverage
uses: codecov/codecov-action@v3
test-python:
name: Test on Python ${{ matrix.python-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest]

steps:
- name: "Checkout code"
uses: actions/checkout@v4

- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install requirements
run: pip install -r requirements-test.txt

- name: Run the migrations
run: ./manage.py migrate

- name: Check missing migrations
run: ./manage.py makemigrations --check

- name: Run Python checks
run: ./manage.py check

- name: Run Python tests and coverage
run: coverage run --source=. ./manage.py test

- name: Send coverage
uses: codecov/codecov-action@v3
18 changes: 18 additions & 0 deletions security/migrations/0010_alter_pmasa_year.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.25 on 2024-06-08 20:47

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('security', '0009_alter_pmasa_id'),
]

operations = [
migrations.AlterField(
model_name='pmasa',
name='year',
field=models.IntegerField(choices=[(2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024)], default=2024),
),
]