Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit f6440ce

Browse files
committed
build: update ci workflow
1 parent 2d57bae commit f6440ce

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)