CI/CD
This commit is contained in:
+11
-14
@@ -18,7 +18,7 @@ jobs:
|
||||
name: Lint & Test
|
||||
runs-on: self-hosted
|
||||
container:
|
||||
image: mirror2.chabokan.net/ubuntu:22.04
|
||||
image: mirror2.chabokan.net/ubuntu:24.04
|
||||
options: --add-host gitea:172.17.0.1
|
||||
|
||||
steps:
|
||||
@@ -73,24 +73,21 @@ jobs:
|
||||
run: |
|
||||
git clone http://gitea:3000/sajad-dev/Ai.git .
|
||||
|
||||
- name: Install Python 3.12
|
||||
- name: Install Python
|
||||
run: |
|
||||
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
|
||||
apt-get install -y python3 python3-pip python3-venv git
|
||||
|
||||
- name: Setup Python pip mirrors
|
||||
run: |
|
||||
python3 -m pip config --user set global.index-url https://package-mirror.liara.ir/repository/pypi/simple
|
||||
python3 -m pip config --user set global.extra-index-url https://mirror.cdn.ir/repository/pypi/simple
|
||||
python3 -m pip config --user set global.trusted-host "package-mirror.liara.ir mirror.cdn.ir mirror2.chabokan.net"
|
||||
|
||||
pip3 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
|
||||
pip3 config --user set global.trusted-host "package-mirror.liara.ir mirror.cdn.ir mirror2.chabokan.net"
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-get install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
pkg-config \
|
||||
build-essential \
|
||||
default-libmysqlclient-dev
|
||||
@@ -98,8 +95,8 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 -m pip install pytest flake8
|
||||
pip3 install -r requirements.txt
|
||||
pip3 install pytest flake8
|
||||
|
||||
- name: Run lint
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user