From ee8e6103298fdbb875ed9fb2e604eec7c907a38e Mon Sep 17 00:00:00 2001 From: Alexander-D-Karpov Date: Mon, 27 Mar 2023 17:57:48 +0300 Subject: [PATCH] fixing ci --- .github/workflows/ci.yml | 18 ++++++ ..._file_created_on_file_filename_and_more.py | 56 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 akarpov/files/migrations/0008_file_completed_on_file_created_on_file_filename_and_more.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e52c79d..94a54f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,24 @@ jobs: - name: Checkout Code Repository uses: actions/checkout@v3 + - name: Cache packages + uses: actions/cache@v2 + id: cache-packages + with: + path: "~/packages/" + + - name: Install packages + env: + CACHE_HIT: ${{steps.cache-valgrind.outputs.cache-hit}} + run: | + if [[ "$CACHE_HIT" == 'true' ]]; then + sudo cp --verbose --force --recursive ~/packages/* / + else + sudo apt-get install --yes libimage-exiftool-perl libmagickwand-dev + mkdir -p ~/packages/ + sudo dpkg -L libimage-exiftool-perl libmagickwand-dev | while IFS= read -r f; do if test -f $f; then echo $f; fi; done | xargs cp --parents --target-directory ~/packages/ + fi + - uses: actions/checkout@v3 - name: Install poetry run: pipx install poetry diff --git a/akarpov/files/migrations/0008_file_completed_on_file_created_on_file_filename_and_more.py b/akarpov/files/migrations/0008_file_completed_on_file_created_on_file_filename_and_more.py new file mode 100644 index 0000000..78da6e0 --- /dev/null +++ b/akarpov/files/migrations/0008_file_completed_on_file_created_on_file_filename_and_more.py @@ -0,0 +1,56 @@ +# Generated by Django 4.1.7 on 2023-03-27 14:57 + +import akarpov.contrib.chunked_upload.models +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ("files", "0007_file_alter_folder_parent_delete_basefile_file_folder_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="file", + name="completed_on", + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name="file", + name="created_on", + field=models.DateTimeField( + auto_now_add=True, default=django.utils.timezone.now + ), + preserve_default=False, + ), + migrations.AddField( + model_name="file", + name="filename", + field=models.CharField(default="", max_length=255), + preserve_default=False, + ), + migrations.AddField( + model_name="file", + name="offset", + field=models.BigIntegerField(default=0), + ), + migrations.AddField( + model_name="file", + name="status", + field=models.PositiveSmallIntegerField( + choices=[(1, "Uploading"), (2, "Complete")], default=1 + ), + ), + migrations.AddField( + model_name="file", + name="upload_id", + field=models.CharField( + default=akarpov.contrib.chunked_upload.models.generate_upload_id, + editable=False, + max_length=32, + unique=True, + ), + ), + ]