From 3d2d8804802358463fe9b042e807cedc1654328f Mon Sep 17 00:00:00 2001 From: Ben C Date: Fri, 17 Sep 2021 14:02:24 -0400 Subject: [PATCH] Created Django Testing Action --- .github/workflows/main.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..941b8b2 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,39 @@ +name: Django Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + + workflow_dispatch: + +jobs: + run_tests: + name: Run Django Tests + runs-on: ubuntu-latest + services: + db: + image: postgres:12.3-alpine + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: github_actions + ports: + - 5432:5432 + options: --mount type=tmpfs,destination=/var/lib/postgresql/data --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python 3.8.5 + uses: actions/setup-python@v2.2.2 + with: + python-version: 3.8.5 + - name: Install dependencies + run: pip install -r requirements.txt + - name: Install psycopg2 + run: pip install psycopg2 + - name: Run tests + run: python manage.py test + env: + STAGE: GH_TEST -- knotmirror 0.0.1