CI/CD
This commit is contained in:
+20
-15
@@ -73,33 +73,38 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone http://gitea:3000/sajad-dev/Ai.git .
|
git clone http://gitea:3000/sajad-dev/Ai.git .
|
||||||
|
|
||||||
- name: Install Python
|
- name: Install Python 3.12
|
||||||
run: |
|
run: |
|
||||||
apt-get install -y python3 python3-pip python3-venv git
|
apt-get install -y software-properties-common
|
||||||
|
add-apt-repository -y ppa:deadsnakes/ppa
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y python3.12 python3.12-venv python3.12-dev
|
||||||
|
python3.12 -m ensurepip --upgrade
|
||||||
|
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
|
||||||
|
|
||||||
- name: Setup Python pip mirrors
|
- name: Setup Python pip mirrors
|
||||||
run: |
|
run: |
|
||||||
pip3 config --user set global.index-url https://package-mirror.liara.ir/repository/pypi/simple
|
python3 -m pip config --user set global.index-url https://package-mirror.liara.ir/repository/pypi/simple
|
||||||
pip3 config --user set global.extra-index-url https://mirror.cdn.ir/repository/pypi/simple
|
python3 -m pip config --user set global.extra-index-url https://mirror.cdn.ir/repository/pypi/simple
|
||||||
pip3 config --user set global.trusted-host "package-mirror.liara.ir mirror.cdn.ir mirror2.chabokan.net"
|
python3 -m pip config --user set global.trusted-host "package-mirror.liara.ir mirror.cdn.ir mirror2.chabokan.net"
|
||||||
|
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
software-properties-common
|
|
||||||
python3.11 python3.11-venv python3.11-dev python3.11-distutils
|
|
||||||
pkg-config \
|
pkg-config \
|
||||||
build-essential \
|
build-essential \
|
||||||
default-libmysqlclient-dev
|
default-libmysqlclient-dev
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python3.11 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
python3.11 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
|
python3 -m pip install pytest flake8
|
||||||
|
|
||||||
# - name: Run lint
|
- name: Run lint
|
||||||
# run: |
|
run: |
|
||||||
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||||
|
|
||||||
# - name: Run tests
|
- name: Run tests
|
||||||
# run: |
|
run: |
|
||||||
# pytest -q
|
pytest -q
|
||||||
|
|||||||
Reference in New Issue
Block a user