Merge pull request 'Create a testing pipeline to automatically run tests on push' (#97) from testing-pipeline into release
Reviewed-on: https://gitea.pangea.org/trustchain-oc1-orchestral/IdHub/pulls/97
This commit is contained in:
commit
9882a467f9
|
@ -0,0 +1,52 @@
|
|||
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 python3-venv
|
||||
id: install
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install python3 python3-venv python3-pip -y
|
||||
|
||||
- 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: Install dependencies
|
||||
run: |
|
||||
source venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
source venv/bin/activate
|
||||
python manage.py test
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
@ -33,8 +33,8 @@ SECRET_KEY = config('SECRET_KEY')
|
|||
DEBUG = config('DEBUG', default=False, cast=bool)
|
||||
DEVELOPMENT = config('DEVELOPMENT', default=False, cast=bool)
|
||||
|
||||
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=[], cast=Csv())
|
||||
CSRF_TRUSTED_ORIGINS = config('CSRF_TRUSTED_ORIGINS', default=[], cast=Csv())
|
||||
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=[])
|
||||
CSRF_TRUSTED_ORIGINS = config('CSRF_TRUSTED_ORIGINS', default=[])
|
||||
|
||||
DOMAIN = config("DOMAIN", "http://localhost")
|
||||
|
||||
|
|
Loading…
Reference in New Issue