"Ensure Unit Tests Running" was running with Django 3 instead of with our production version. Recently, this started causing the check to fail due to an upgraded requirement that doesn't work with Django 3 yet. Co-Authored-By: Kyle McCormick <kmccormick@edx.org>
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
run_tests:
|
|
name: Ensure Unit Tests Running
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.8']
|
|
include:
|
|
- os: ubuntu-20.04
|
|
path: ~/.cache/pip
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: setup python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install Required Packages
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install libxmlsec1-dev
|
|
sudo systemctl start mongod
|
|
|
|
- name: Get pip cache dir
|
|
id: pip-cache-dir
|
|
run: |
|
|
echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
- name: Cache pip dependencies
|
|
id: cache-dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/testing.txt') }}
|
|
restore-keys: ${{ runner.os }}-pip-
|
|
|
|
|
|
- name: Install Python Dependencies
|
|
if: steps.cache-dependencies.output.cache-hit != 'true'
|
|
run: |
|
|
pip install setuptools wheel
|
|
pip install -r requirements/edx/testing.txt
|
|
|
|
- name: Install Django
|
|
run: pip install -r requirements/edx/django.txt
|
|
|
|
- name: Collect Tests
|
|
env:
|
|
STUDIO_CFG: lms/envs/bok_choy.yml
|
|
run: for dir in $(find . -name "pytest.ini" -exec dirname {} \;); do pytest --collect-only $dir; done
|