diff --git a/.github/workflows/pythontest.yml b/.github/workflows/pythontest.yml index 8544989bf6..7fdf6e178c 100644 --- a/.github/workflows/pythontest.yml +++ b/.github/workflows/pythontest.yml @@ -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 @@ -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" @@ -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: diff --git a/README.md b/README.md index 4cb7608a0f..28b74caf5a 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/docker-compose.yml b/docker-compose.yml index cb1cc9decb..02732ba585 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/docs/manual_setup.md b/docs/manual_setup.md index c61e0cc082..f0e3c77cf7 100644 --- a/docs/manual_setup.md +++ b/docs/manual_setup.md @@ -1,5 +1,3 @@ - - # Manually installing dependencies ## Install @@ -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/) @@ -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 ``` @@ -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 ``` @@ -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: