Skip to content

Commit d2c07e8

Browse files
authoredMay 9, 2023
Update workflows (#593)
* Drop Python 3.7 * Use latest actions Fix #591
1 parent 1f906e6 commit d2c07e8

File tree

4 files changed

+15
-29
lines changed

4 files changed

+15
-29
lines changed
 

‎.github/workflows/django.yaml

+4-13
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,28 @@ on:
55

66
jobs:
77
build:
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
99
steps:
1010
- name: Start MySQL
1111
run: |
1212
sudo systemctl start mysql.service
1313
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -uroot -proot mysql
1414
mysql -uroot -proot -e "CREATE USER 'scott'@'%' IDENTIFIED BY 'tiger'; GRANT ALL ON *.* TO scott;"
1515
16-
- uses: actions/cache@v2
17-
with:
18-
path: ~/.cache/pip
19-
key: ${{ runner.os }}-django-pip-1
20-
restore-keys: |
21-
${{ runner.os }}-pip-
16+
- uses: actions/checkout@v3
2217

2318
- name: Set up Python
24-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v4
2520
with:
2621
# https://www.mail-archive.com/django-updates@googlegroups.com/msg209056.html
2722
python-version: "3.8"
2823

29-
- uses: actions/checkout@v2
30-
with:
31-
fetch-depth: 2
32-
3324
- name: Install mysqlclient
3425
env:
3526
PIP_NO_PYTHON_VERSION_WARNING: 1
3627
PIP_DISABLE_PIP_VERSION_CHECK: 1
3728
run: |
38-
pip install -U pytest pytest-cov tblib
29+
pip install -r requirements.txt
3930
pip install .
4031
# pip install mysqlclient # Use stable version
4132

‎.github/workflows/tests.yaml

+6-15
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,20 @@ on:
66

77
jobs:
88
build:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
12+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1313
steps:
1414
- name: Start MySQL
1515
run: |
1616
sudo systemctl start mysql.service
1717
mysql -uroot -proot -e "CREATE DATABASE mysqldb_test"
1818
19-
- uses: actions/cache@v2
20-
with:
21-
path: ~/.cache/pip
22-
key: ${{ runner.os }}-pip-1
23-
restore-keys: |
24-
${{ runner.os }}-pip-
25-
26-
- uses: actions/checkout@v2
27-
with:
28-
fetch-depth: 2
19+
- uses: actions/checkout@v3
2920

3021
- name: Set up Python ${{ matrix.python-version }}
31-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v4
3223
with:
3324
python-version: ${{ matrix.python-version }}
3425

@@ -37,7 +28,7 @@ jobs:
3728
PIP_NO_PYTHON_VERSION_WARNING: 1
3829
PIP_DISABLE_PIP_VERSION_CHECK: 1
3930
run: |
40-
pip install -U coverage pytest pytest-cov
31+
pip install -r requirements.txt
4132
python setup.py develop
4233
4334
- name: Run tests
@@ -46,4 +37,4 @@ jobs:
4637
run: |
4738
pytest --cov=MySQLdb tests
4839
49-
- uses: codecov/codecov-action@v1
40+
- uses: codecov/codecov-action@v3

‎metadata.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ classifiers:
2121
Programming Language :: C
2222
Programming Language :: Python
2323
Programming Language :: Python :: 3
24-
Programming Language :: Python :: 3.7
2524
Programming Language :: Python :: 3.8
2625
Programming Language :: Python :: 3.9
2726
Programming Language :: Python :: 3.10

‎requirements.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file is for GitHub Action
2+
coverage
3+
pytest
4+
pytest-cov
5+
tblib

0 commit comments

Comments
 (0)