From 47bc8ec357a2abab740a082d4bb89d8a81547f92 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Mon, 18 Mar 2024 16:19:39 -0700 Subject: [PATCH 1/2] fix(ci): pr close missing promotions (#106) --- frontend/Dockerfile.nginx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/Dockerfile.nginx b/frontend/Dockerfile.nginx index 22ffc44..7cb1742 100644 --- a/frontend/Dockerfile.nginx +++ b/frontend/Dockerfile.nginx @@ -12,7 +12,7 @@ ENV PYTHONUNBUFFERED 1 ENV PATH="/venv/bin:$PATH" RUN apt-get update --no-install-recommends && \ - apt-get install -y gcc + apt-get install -y gcc RUN python -m venv /venv # install requirements @@ -32,10 +32,10 @@ COPY --from=BUILDER /app/nginx.conf /app/nginx.conf COPY start_nginx.sh /app/start_nginx.sh ## add permissions for nginx user RUN chown -R nginx:nginx /app && chmod -R 777 /app && \ - chown -R nginx:nginx /var/cache/nginx && chmod -R 777 /var/cache/nginx && \ - chown -R nginx:nginx /var/log/nginx && chmod -R 777 /var/log/nginx && \ - chown -R nginx:nginx /etc/nginx/conf.d && chmod -R 777 /etc/nginx/conf.d && \ - chown -R nginx:nginx /etc/nginx/nginx.conf && chmod -R 777 /etc/nginx/nginx.conf + chown -R nginx:nginx /var/cache/nginx && chmod -R 777 /var/cache/nginx && \ + chown -R nginx:nginx /var/log/nginx && chmod -R 777 /var/log/nginx && \ + chown -R nginx:nginx /etc/nginx/conf.d && chmod -R 777 /etc/nginx/conf.d && \ + chown -R nginx:nginx /etc/nginx/nginx.conf && chmod -R 777 /etc/nginx/nginx.conf RUN touch /var/run/nginx.pid && \ chown -R nginx:nginx /var/run/nginx.pid && chmod -R 777 /var/run/nginx.pid From b7118b2c4fdc9f29063df06bbd969b8ef3533d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20M=C3=BCller?= Date: Mon, 18 Mar 2024 16:54:41 -0700 Subject: [PATCH 2/2] feat: adding django tests to github action analysis (#108) * adding django tests to github action analysis * path fix * adding env parameters * fixed env --- .github/workflows/analysis.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index b473056..a4b0a1e 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -53,9 +53,36 @@ jobs: with: sarif_file: "trivy-results.sarif" + tests: + name: Django Tests + if: ${{ ! github.event.pull_request.draft }} + runs-on: ubuntu-22.04 + defaults: + run: + working-directory: frontend + env: + DEBUG: "False" + ALLOWED_HOSTS: 'localhost,' + CSRF_TRUSTED_ORIGINS: 'http://localhost,https://localhost' + SECRET_KEY: 'temporary_debug_key' + timeout-minutes: 15 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install requirements + run: | + pip install -r requirements.txt + - name: Run tests + run: | + python manage.py test + results: name: Analysis Results - needs: [codeql, trivy] + needs: [codeql, trivy, tests] runs-on: ubuntu-22.04 steps: - run: echo "Workflow completed successfully!"