name: Django CI Pipeline on: push: branches: - main - release - testing-pipeline jobs: test: runs-on: ubuntu-22.04 env: SECRET_KEY: "t3st-dummy-s3cr3t-k3y" STATIC_ROOT: "tmp/static/" MEDIA_ROOT: "tmp/media/" steps: - uses: actions/checkout@v4 - name: Install pre-requisite packages id: prereq run: | apt-get update apt-get install software-properties-common - name: Install python3-venv id: install run: | add-apt-repository ppa:deadsnakes/ppa apt-get update apt-get install python3.11 python3.11-venv python3.11-pip -y if: steps.prereq.outcome == 'success' - name: Check Python version run: | python3 --version echo "Python version: $(python3 --version)" - name: Create virtual environment run: | python3 -m venv venv source venv/bin/activate echo "Virtual environment created successfully" # https://docs.github.com/en/actions/learn-github-actions/contexts#steps-context if: steps.install.outcome == 'success' - name: Get DIDKit wheel id: didkit run: | wget https://gitea.pangea.org/trustchain-oc1-orchestral/ssikit_trustchain/raw/branch/master/didkit-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl echo "Successfully downloaded DIDkit" - name: Install dependencies run: | source venv/bin/activate pip install --upgrade pip pip install -r requirements.txt if: steps.didkit.outcome == 'success' - name: Run tests run: | source venv/bin/activate python manage.py test