chore(deps): update dependency tornado to v6 [security] #2607
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
name: CI | |
on: [push] | |
jobs: | |
python-tests: | |
runs-on: ubuntu-20.04 | |
services: | |
# Label used to access the service container | |
db: | |
# Docker Hub image | |
image: postgres:12.7 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
redis: | |
image: redis:5.0.8 | |
ports: | |
- 6379:6379 | |
opensearch: | |
image: opensearchproject/opensearch:1.2.4 | |
env: | |
network.host: "0.0.0.0" | |
http.cors.enabled: "true" | |
http.cors.allow-origin: "*" | |
rest.action.multi.allow_explicit_index: "false" | |
ES_JAVA_OPTS: -Xms512m -Xmx512m" | |
ports: | |
- 9200:9200 | |
strategy: | |
matrix: | |
opensearch-version: [1.2] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Apt install | |
run: cat Aptfile | sudo xargs apt-get install | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9.1" | |
- id: cache | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/test_reqirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: pip install -r requirements.txt -r test_requirements.txt | |
- name: Lint | |
run: pylint ./**/*.py | |
# You must also add the Configure sysctl limits step, otherwise Opensearch will not be able to boot. | |
- name: Configure sysctl limits | |
run: | | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
- name: Runs Opensearch | |
uses: ankane/setup-opensearch@v1 | |
with: | |
opensearch-version: ${{ matrix.opensearch-version }} | |
- name: Tests | |
run: | | |
export MEDIA_ROOT="$(mktemp -d)" | |
sudo mkdir /var/media | |
sudo chown -R $USER:$USER /var/media | |
tox | |
env: | |
DEBUG: 'False' | |
NODE_ENV: 'production' | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres | |
MICROMASTERS_SECURE_SSL_REDIRECT: 'False' | |
MICROMASTERS_DB_DISABLE_SSL: 'True' | |
OPENSEARCH_URL: localhost:9200 | |
CELERY_TASK_ALWAYS_EAGER: 'True' | |
BROKER_URL: redis://localhost:6379/4 | |
CELERY_RESULT_BACKEND: redis://localhost:6379/4 | |
- name: Upload coverage to CodeCov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.xml | |
javascript-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up NodeJS | |
uses: actions/setup-node@v2-beta | |
with: | |
node-version: "14.18.2" | |
- name: Set up environment | |
run: sudo apt-get install libelf1 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- uses: actions/cache@v1 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Lints | |
run: npm run lint | |
- name: Code formatting | |
run: npm run fmt:check | |
- name: Scss lint | |
run: npm run scss_lint | |
- name: Flow | |
run: npm run flow | |
- name: Tests | |
run: npm run test | |
env: | |
CODECOV: true | |
NODE_ENV: development | |
- name: Webpack build | |
run: node node_modules/webpack/bin/webpack.js --config webpack.config.prod.js --bail | |
- name: Upload coverage to CodeCov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: coverage/lcov.info |