@@ -25,25 +25,32 @@ jobs:
2525 with :
2626 python-version : ${{ matrix.python-version }}
2727
28- - name : Install dependencies
29- run : |
30- pip install -r requirements/pip.txt
31- pip install -r requirements/ci.txt
32-
3328 - name : Start Container
3429 run : docker-compose -f .github/docker-compose-ci.yml up -d
3530
3631 - name : Install Python 3.11
3732 if : matrix.python-version == '3.11'
38- run : docker exec -t analytics_api_testing bash -c "apt-get install -y python3.11"
33+ run : docker exec -t analytics_api_testing bash -c "apt-get update
34+ && apt-get install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa -y
35+ && apt-get update && apt-get install -y python3.11"
3936
4037 - name : Create symbolic link for Python 3.11
4138 if : matrix.python-version == '3.11'
4239 run : docker exec -t analytics_api_testing bash -c "ln -sf /usr/bin/python3.11 /usr/local/bin/python3"
4340
41+ - name : Set TOXENV
42+ id : set-toxenv
43+ run : |
44+ if [[ ${{ matrix.python-version }} == '3.8' ]]; then
45+ echo "::set-output name=toxenv::py38-django42"
46+ elif [[ ${{ matrix.python-version }} == '3.11' ]]; then
47+ echo "::set-output name=toxenv::py311-django42"
48+ fi
49+
4450 - name : Run Tests
45- run : docker exec -t analytics_api_testing bash -c "cd /edx/app/analytics_api/analytics_api/
46- && export TOXENV=django42 && make test.requirements tox.requirements ${{ matrix.targets }}"
51+ run : |
52+ docker exec -t analytics_api_testing bash -c "cd /edx/app/analytics_api/analytics_api/
53+ && export TOXENV=${{ steps.set-toxenv.outputs.toxenv }} && make test.requirements tox.requirements ${{ matrix.targets }}"
4754
4855 - name : Run Coverage
4956 if : matrix.python-version == '3.8' && matrix.targets=='main.test'
0 commit comments