CI/CD
This commit is contained in:
+50
-19
@@ -18,25 +18,53 @@ jobs:
|
|||||||
name: Lint & Test
|
name: Lint & Test
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
container:
|
container:
|
||||||
image: mirror2.chabokan.net/ubuntu:24.04
|
image: mirror2.chabokan.net/ubuntu:22.04
|
||||||
options: --add-host gitea:172.17.0.1
|
options: --add-host gitea:172.17.0.1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
|
||||||
- name: Setup Ubuntu apt mirrors
|
- name: Setup Ubuntu apt mirrors
|
||||||
run: |
|
run: |
|
||||||
tee /etc/apt/sources.list > /dev/null <<'EOF'
|
tee /etc/apt/sources.list > /dev/null <<'EOF'
|
||||||
deb [trusted=yes] https://mirror-linux.runflare.com/ubuntu/ noble main restricted universe multiverse
|
deb https://mirror-linux.runflare.com/ubuntu/ noble main restricted universe multiverse
|
||||||
deb [trusted=yes] https://mirror-linux.runflare.com/ubuntu/ noble-updates main restricted universe multiverse
|
deb https://mirror-linux.runflare.com/ubuntu/ noble-updates main restricted universe multiverse
|
||||||
deb [trusted=yes] https://mirror-linux.runflare.com/ubuntu/ noble-backports main restricted universe multiverse
|
deb https://mirror-linux.runflare.com/ubuntu/ noble-backports main restricted universe multiverse
|
||||||
deb [trusted=yes] https://mirror-linux.runflare.com/ubuntu/ noble-security main restricted universe multiverse
|
deb https://mirror-linux.runflare.com/ubuntu/ noble-security main restricted universe multiverse
|
||||||
|
|
||||||
|
deb [trusted=yes] https://mirror2.chabokan.net/ubuntu focal main universe
|
||||||
|
deb [trusted=yes] https://mirror2.chabokan.net/ubuntu focal-updates main universe
|
||||||
|
deb [trusted=yes] https://mirror2.chabokan.net/ubuntu focal-security main universe
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
deb http://mirror.iranserver.com/ubuntu/ jammy main restricted
|
||||||
|
deb-src http://mirror.iranserver.com/ubuntu/ jammy main restricted
|
||||||
|
|
||||||
|
|
||||||
|
deb http://mirror.iranserver.com/ubuntu/ jammy-updates main restricted
|
||||||
|
deb-src http://mirror.iranserver.com/ubuntu/ jammy-updates main restricted
|
||||||
|
|
||||||
|
|
||||||
|
deb http://mirror.iranserver.com/ubuntu/ jammy universe
|
||||||
|
deb-src http://mirror.iranserver.com/ubuntu/ jammy universe
|
||||||
|
deb http://mirror.iranserver.com/ubuntu/ jammy-updates universe
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
deb http://mirror.iranserver.com/ubuntu/ jammy multiverse
|
||||||
|
deb-src http://mirror.iranserver.com/ubuntu/ jammy multiverse
|
||||||
|
deb http://mirror.iranserver.com/ubuntu/ jammy-updates multiverse
|
||||||
|
deb-src http://mirror.iranserver.com/ubuntu/ jammy-updates multiverse
|
||||||
|
|
||||||
|
|
||||||
|
deb http://mirror.iranserver.com/ubuntu/ jammy-backports main restricted universe multiverse
|
||||||
|
deb-src http://mirror.iranserver.com/ubuntu/ jammy-backports main restricted universe multiverse
|
||||||
|
|
||||||
|
|
||||||
deb [trusted=yes] http://mirror.iranserver.com/ubuntu/ noble main restricted universe multiverse
|
|
||||||
deb [trusted=yes] http://mirror.iranserver.com/ubuntu/ noble-updates main restricted universe multiverse
|
|
||||||
deb [trusted=yes] http://mirror.iranserver.com/ubuntu/ noble-backports main restricted universe multiverse
|
|
||||||
deb [trusted=yes] http://mirror.iranserver.com/ubuntu/ noble-security main restricted universe multiverse
|
|
||||||
EOF
|
EOF
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
- name: Install git
|
- name: Install git
|
||||||
run: |
|
run: |
|
||||||
apt-get install -y git
|
apt-get install -y git
|
||||||
@@ -45,6 +73,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone http://gitea:3000/sajad-dev/Ai.git .
|
git clone http://gitea:3000/sajad-dev/Ai.git .
|
||||||
|
|
||||||
|
- name: Install Python
|
||||||
|
run: |
|
||||||
|
apt-get install -y python3 python3-pip python3-venv git
|
||||||
|
|
||||||
|
- name: Setup Python pip mirrors
|
||||||
|
run: |
|
||||||
|
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
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
@@ -55,17 +92,11 @@ jobs:
|
|||||||
build-essential \
|
build-essential \
|
||||||
default-libmysqlclient-dev
|
default-libmysqlclient-dev
|
||||||
|
|
||||||
- name: Setup Python pip mirrors
|
|
||||||
run: |
|
|
||||||
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 dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip --break-system-packages
|
python3 -m pip install --upgrade pip
|
||||||
pip3 install -r requirements.txt --break-system-packages
|
pip3 install -r requirements.txt
|
||||||
pip3 install pytest flake8 --break-system-packages
|
pip3 install pytest flake8
|
||||||
|
|
||||||
- name: Run lint
|
- name: Run lint
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user