Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openedx/edx-notes-api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1a9b021deed47ec2b2222e9427280097b0b4363c
Choose a base ref
..
head repository: openedx/edx-notes-api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c0dd1393c2ad194a587b8ead9dce41f821abab1b
Choose a head ref
Showing with 15 additions and 30 deletions.
  1. +15 −30 .github/workflows/ci.yml
45 changes: 15 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -20,42 +20,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }} with cache
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
- name: Install system MySQL
run: |
sudo apt-get update
sudo apt-get install -y \
default-libmysqlclient-dev build-essential \
libssl-dev openjdk-11-jdk curl
- name: Install MySQL
run: |
sudo apt-get install -y gnupg
curl -OL https://dev.mysql.com/get/mysql-apt-config_0.8.32-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.32-1_all.deb
sudo apt-get update
sudo apt-get install -y mysql-server
# Ensure the MySQL service is started
sudo apt-get update && sudo apt-get install -y libxmlsec1-dev mysql-client
sudo service mysql start
sudo service mysql status
# Wait for MySQL service to be fully ready
sleep 10
# Set root password and allow password-based root access
sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';"
sudo mysql -e "FLUSH PRIVILEGES;"
# Create database and user
echo "CREATE DATABASE IF NOT EXISTS edx_notes_api;" | sudo mysql -u root -proot
echo "CREATE USER IF NOT EXISTS 'notes001'@'localhost' IDENTIFIED BY 'secret';" | sudo mysql -u root -proot
echo "GRANT ALL PRIVILEGES ON edx_notes_api.* TO 'notes001'@'localhost';" | sudo mysql -u root -proot
echo "FLUSH PRIVILEGES;" | sudo mysql -u root -proot
mysql -h 127.0.0.1 -u root -proot -e "UPDATE mysql.user SET authentication_string = null WHERE user = 'root'; FLUSH PRIVILEGES;"
echo "CREATE DATABASE IF NOT EXISTS edx_notes_api;" | sudo mysql -u root
- name: Install Elasticsearch
run: |
@@ -72,4 +47,14 @@ jobs:
pip install --upgrade pip tox
- name: Run Tox tests
env:
CONN_MAX_AGE: 60
DB_ENGINE: django.db.backends.mysql
DB_HOST: localhost
DB_NAME: edx_notes_api
DB_PASSWORD:
DB_PORT: 3306
DB_USER: root
ENABLE_DJANGO_TOOLBAR: 1
ELASTICSEARCH_URL: http://localhost:9200
run: tox -e ${{ matrix.toxenv }}