From 63d6b7a5a8fd7aa447ca36bca74d80b09c79d0dd Mon Sep 17 00:00:00 2001 From: lagertonne Date: Tue, 12 Nov 2024 16:51:29 +0100 Subject: [PATCH] cicd: run on every pull request, but only deploy on testing --- .forgejo/workflows/pull_request.yml | 20 ++++++++++++++++++++ .forgejo/workflows/testing.yml | 1 + 2 files changed, 21 insertions(+) create mode 100644 .forgejo/workflows/pull_request.yml diff --git a/.forgejo/workflows/pull_request.yml b/.forgejo/workflows/pull_request.yml new file mode 100644 index 0000000..1171616 --- /dev/null +++ b/.forgejo/workflows/pull_request.yml @@ -0,0 +1,20 @@ +on: + pull_request: + +jobs: + test: + runs-on: docker + container: + image: ghcr.io/catthehacker/ubuntu:act-22.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache-dependency-path: '**/requirements.dev.txt' + - name: Install dependencies + working-directory: core + run: pip3 install -r requirements.dev.txt + - name: Run django tests + working-directory: core + run: python3 manage.py test diff --git a/.forgejo/workflows/testing.yml b/.forgejo/workflows/testing.yml index dd16880..3b44d24 100644 --- a/.forgejo/workflows/testing.yml +++ b/.forgejo/workflows/testing.yml @@ -2,6 +2,7 @@ on: push: branches: - testing + jobs: test: runs-on: docker