-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3271 from codalab/develop
Merge develop into master
- Loading branch information
Showing
47 changed files
with
699 additions
and
1,317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,24 +103,43 @@ FLOWER_PORT=5555 | |
# ---------------------------------------------------------------------------- | ||
DJANGO_SECRET_KEY=change-me-to-a-secret | ||
DJANGO_PORT=8000 | ||
DEBUG=True | ||
NGINX_PORT=80 | ||
|
||
SSL_PORT=443 | ||
#SSL_CERTIFICATE= | ||
#SSL_CERTIFICATE_KEY= | ||
# Allowed hosts separated by space | ||
|
||
# Make sure debug is off on production | ||
DEBUG=True | ||
# These admins will be emailed when there are errors | ||
#ADMINS=Name,[email protected];OtherName,[email protected] | ||
|
||
# Put SSL certificates in ./certs/ and they are mapped to /app/certs in the container | ||
#SSL_CERTIFICATE=/app/certs/certificate.crt | ||
#SSL_CERTIFICATE_KEY=/app/certs/certificate.pem | ||
# Allowed hosts separated by space (e.g. example.com) | ||
SSL_ALLOWED_HOSTS= | ||
|
||
# Set this to your actual domain, like example.com | ||
CODALAB_SITE_DOMAIN=localhost | ||
|
||
# How many site workers (submission result processors)? | ||
# A higher value, e.g. 16, is advised for a production environment | ||
WEB_CONCURRENCY=2 | ||
|
||
# Google Analytics code (leave empty to disable Google's user tracking) | ||
GOOGLE_ANALYTICS= | ||
|
||
# ========================================================================= | ||
# ========================================================================= | ||
# This section can be left commented for a testing environment | ||
#EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend | ||
#EMAIL_HOST=smtp.sendgrid.net | ||
#EMAIL_HOST_USER= | ||
#EMAIL_HOST_PASSWORD= | ||
#EMAIL_PORT=587 | ||
#EMAIL_USE_TLS=True | ||
#DEFAULT_FROM_EMAIL=CodaLab <[email protected]> | ||
#[email protected] | ||
|
||
# ---------------------------------------------------------------------------- | ||
# Logging | ||
# ---------------------------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/codalab/requirements" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Run Pytests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
jobs: | ||
run-tests: | ||
services: | ||
# Label used to access the service container | ||
postgres: | ||
# Docker Hub image | ||
# use the same version as docker-compose.yml | ||
image: "postgres:12.6-alpine" | ||
# Provide the password for postgres | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_USER: root | ||
POSTGRES_DB: codalab_website | ||
# Set health checks to wait until postgres has started | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
memcached: | ||
image: memcached | ||
ports: | ||
- 11211:11211 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8.3 | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
# This path is specific to Ubuntu | ||
path: ~/.cache/pip | ||
# Look to see if there is a cache hit for the corresponding requirements file | ||
key: ${{ runner.os }}-pip-${{ hashFiles('common.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
- name: Add required host mappings | ||
run: | | ||
echo "127.0.0.1 memcached" | sudo tee --append /etc/hosts | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install libxml2-dev libxslt-dev python-dev | ||
sudo apt-get update --allow-releaseinfo-change && sudo apt-get install libmemcached-dev --fix-missing | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest pytest-cov pytest-dependency pytest-django | ||
pip install -r ./codalab/requirements/requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --show-source | ||
- name: Run Tests | ||
env: | ||
DB_ENGINE: "postgresql" | ||
DB_HOST: 127.0.0.1 | ||
DB_PORT: "5432" | ||
DB_NAME: "codalab_website" | ||
DB_USER: "root" | ||
DB_PASSWORD: "password" | ||
CHAHUB_API_URL: "http://localhost/test/" | ||
CHAHUB_API_KEY: "some-secret-key" | ||
MEMCACHED_PORT: 11211 | ||
working-directory: ./codalab | ||
run: | | ||
#pytest --cov=./ --cov-report=xml | ||
py.test --cov=./ --cov-report=xml | ||
- name: Upload coverage reports to Codecov with GitHub Action | ||
uses: codecov/codecov-action@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.