Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/workflows/pythontest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ jobs:
with:
github_token: ${{ github.token }}
paths: '["**.py", "requirements.txt", "requirements-dev.txt", ".github/workflows/pythontest.yml"]'

unit_test:
name: Python unit tests
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest

services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
image: postgres:12
# Provide the password for postgres
env:
POSTGRES_USER: learningequality
Expand All @@ -42,7 +44,7 @@ jobs:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
image: redis:4.0.9
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
Expand All @@ -52,16 +54,16 @@ jobs:
ports:
# Maps port 6379 on service container to the host
- 6379:6379
minio:
image: bitnami/minio
env:
MINIO_API_CORS_ALLOW_ORIGIN: http://localhost:8080
MINIO_ACCESS_KEY: development
MINIO_SECRET_KEY: development
ports:
- 9000:9000
steps:
- uses: actions/checkout@v2
- name: Set up minio
run: |
docker run -d -p 9000:9000 --name minio \
-e "MINIO_ACCESS_KEY=development" \
-e "MINIO_SECRET_KEY=development" \
-v /tmp/minio_data:/data \
-v /tmp/minio_config:/root/.minio \
minio/minio server /data
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To confirm that the services are running, run `docker ps`, and you should see th
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e09c5c203b93 redis:4.0.9 "docker-entrypoint.s…" 51 seconds ago Up 49 seconds 0.0.0.0:6379->6379/tcp studio_vue-refactor_redis_1
6164371efb6b minio/minio "minio server /data" 51 seconds ago Up 49 seconds 0.0.0.0:9000->9000/tcp studio_vue-refactor_minio_1
c86bbfa3a59e postgres:9.6 "docker-entrypoint.s…" 51 seconds ago Up 49 seconds 0.0.0.0:5432->5432/tcp studio_vue-refactor_postgres_1
c86bbfa3a59e postgres:12.10 "docker-entrypoint.s…" 51 seconds ago Up 49 seconds 0.0.0.0:5432->5432/tcp studio_vue-refactor_postgres_1
```


Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ services:
- minio_data:/data

postgres:
image: postgres:9.6
image: postgres:12
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_USER: learningequality
Expand Down
14 changes: 6 additions & 8 deletions docs/manual_setup.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


# Manually installing dependencies

## Install
Expand All @@ -9,7 +7,7 @@ Rather than using Docker, it is also possible to manually install the dependenci
- [python (2.7)](https://www.python.org/downloads/release/python-2713/)
- [python-pip](https://pip.pypa.io/en/stable/installing/)
- [nodejs (10.x)](https://nodejs.org/en/download/)
- [Postgres DB](https://www.postgresql.org/download/)
- [Postgres DB (12.x)](https://www.postgresql.org/download/)
- [redis](https://redis.io/topics/quickstart)
- [minio server](https://www.minio.io/downloads.html)
- [nginx](https://www.nginx.com/resources/wiki/start/topics/tutorials/install/)
Expand Down Expand Up @@ -37,7 +35,7 @@ curl -sL https://deb.nodesource.com/setup_10.x | bash -

# Install packages
apt-get install -y python python-pip python-dev python-tk \
postgresql-server-dev-all postgresql-contrib postgresql-client postgresql \
postgresql-server-dev-all postgresql-contrib postgresql-client postgresql-12 \
ffmpeg nodejs libmagickwand-dev nginx redis-server wkhtmltopdf
```

Expand All @@ -46,9 +44,9 @@ apt-get install -y python python-pip python-dev python-tk \
You can install the corresponding packages using Homebrew:

```bash
brew install postgresql@9.6 redis node ffmpeg imagemagick@6 gs
brew install postgresql@12 redis node ffmpeg imagemagick@6 gs
brew install minio/stable/minio
brew link --force postgresql@9.6
brew link --force postgresql@12
brew link --force imagemagick@6
```

Expand All @@ -62,13 +60,13 @@ Windows is no longer supported due to incompatibilities with some of the require

## Set up the database

Install [postgres](https://www.postgresql.org/download/) if you don't have it already. If you're using a package manager, you need to make sure you install the following packages: `postgresql`, `postgresql-contrib`, and `postgresql-server-dev-all` which will be required to build `psycopg2` python driver.
Install [postgres](https://www.postgresql.org/download/) if you don't have it already. If you're using a package manager, you need to make sure you install the following packages: `postgresql-12`, `postgresql-contrib`, and `postgresql-server-dev-all` which will be required to build `psycopg2` python driver.

Make sure postgres is running:

```bash
service postgresql start
# alternatively: pg_ctl -D /usr/local/var/postgresql@9.6 start
# alternatively: pg_ctl -D /usr/local/var/postgresql@12 start
```

Start the client with:
Expand Down