From 895d4b33a673cd5ffe1af07b11559858296ab5e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DURR?= Date: Fri, 26 Aug 2022 23:19:29 +0200 Subject: [PATCH 1/6] Going back to actions again --- .github/workflows/deploy.yml | 27 ++++++++++++++++----------- .github/workflows/unittests.yml | 2 +- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 90fdc387..3c179b3c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -44,15 +44,20 @@ jobs: poetry run ./manage.py compilemessages sudo systemctl restart uwsgi + + sentry: + runs-on: ubuntu-latest + environment: production + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 - sentry-release: - - uses: actions/checkout@v2 - - name: Create Sentry release - uses: getsentry/action-release@v1 - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - SENTRY_URL: ${{ secrets.SENTRY_URL }} - with: - environment: production + - name: Sentry Release + uses: getsentry/action-release@v1.2.0 + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} + SENTRY_URL: ${{ secrets.SENTRY_URL }} + with: + environment: production diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 70a7a00f..cd4834f3 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -19,7 +19,7 @@ jobs: uses: technote-space/get-diff-action@v6 id: git-diff with: - PATTERNS: +**/*.+(py) + PATTERNS: /**/*.py - name: Set up python if: steps.git-diff.outputs.diff From 02047b62d71a71f21ccb8662cc69e5b0933dce3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DURR?= Date: Fri, 26 Aug 2022 23:21:34 +0200 Subject: [PATCH 2/6] Edited random file --- subscription/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subscription/models.py b/subscription/models.py index f0ea0907..54700611 100644 --- a/subscription/models.py +++ b/subscription/models.py @@ -76,6 +76,8 @@ class Subscription(models.Model): class Meta: ordering = ["subscription_start"] + + def clean(self): try: for s in ( @@ -97,6 +99,8 @@ class Subscription(models.Model): # TODO see SubscriptionForm's clean method raise ValidationError(_("Subscription error")) + + def save(self): super(Subscription, self).save() from counter.models import Customer From 705dc56153e15cdc87ba2a81fa7cdbc5b7a8726f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DURR?= Date: Fri, 26 Aug 2022 23:26:37 +0200 Subject: [PATCH 3/6] Testing another regex --- .github/workflows/unittests.yml | 2 +- subscription/models.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index cd4834f3..23c58c63 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -19,7 +19,7 @@ jobs: uses: technote-space/get-diff-action@v6 id: git-diff with: - PATTERNS: /**/*.py + PATTERNS: +/**/*.py - name: Set up python if: steps.git-diff.outputs.diff diff --git a/subscription/models.py b/subscription/models.py index 54700611..f0ea0907 100644 --- a/subscription/models.py +++ b/subscription/models.py @@ -76,8 +76,6 @@ class Subscription(models.Model): class Meta: ordering = ["subscription_start"] - - def clean(self): try: for s in ( @@ -99,8 +97,6 @@ class Subscription(models.Model): # TODO see SubscriptionForm's clean method raise ValidationError(_("Subscription error")) - - def save(self): super(Subscription, self).save() from counter.models import Customer From f2dcc39c14f3d0a4cef862ddc5cdf7c81f3b4297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DURR?= Date: Fri, 26 Aug 2022 23:28:08 +0200 Subject: [PATCH 4/6] No inspiration --- subscription/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/subscription/models.py b/subscription/models.py index f0ea0907..e0a3f17b 100644 --- a/subscription/models.py +++ b/subscription/models.py @@ -73,9 +73,16 @@ class Subscription(models.Model): verbose_name=_("location"), ) + + + class Meta: ordering = ["subscription_start"] + + + + def clean(self): try: for s in ( From 1da82ac2dd41353c76522aecf6012b1269af91fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DURR?= Date: Fri, 26 Aug 2022 23:31:33 +0200 Subject: [PATCH 5/6] Another regex --- .github/workflows/unittests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 23c58c63..11b8f9db 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -19,7 +19,8 @@ jobs: uses: technote-space/get-diff-action@v6 id: git-diff with: - PATTERNS: +/**/*.py + PATTERNS: | + **/*.py - name: Set up python if: steps.git-diff.outputs.diff From 7f39ead159667ef8c189ad7cd119f9b185b9753d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DURR?= Date: Fri, 26 Aug 2022 23:32:43 +0200 Subject: [PATCH 6/6] This should work now --- subscription/models.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/subscription/models.py b/subscription/models.py index e0a3f17b..f0ea0907 100644 --- a/subscription/models.py +++ b/subscription/models.py @@ -73,16 +73,9 @@ class Subscription(models.Model): verbose_name=_("location"), ) - - - class Meta: ordering = ["subscription_start"] - - - - def clean(self): try: for s in (