From e36641cbf03bfef24f3bbd3c8309a4e1496dcc41 Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Tue, 13 Dec 2022 23:13:26 +0530 Subject: [PATCH] build: plane test github actions --- .github/workflows/test_runner.yml | 49 +++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/test_runner.yml diff --git a/.github/workflows/test_runner.yml b/.github/workflows/test_runner.yml new file mode 100644 index 000000000..5f22fc80f --- /dev/null +++ b/.github/workflows/test_runner.yml @@ -0,0 +1,49 @@ +name: Plane Tests + +on: + push: + pull_request: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:latest + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: github_actions + ports: + - 5432:5432 + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + + redis: + image: redis:latest + env: + REDIS_HOST: localhost + REDIS_PORT: 6379 + ports: + - 6379:6379 + options: --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: psycopg2 prerequisites + run: sudo apt-get install libpq-dev + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements/test.txt + - name: Run Tests + run: coverage run --source='.' manage.py test --settings=plane.settings.test