fix: 修改异步队列数据保存格式 --story=126514126 #6411
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unittest | |
on: | |
push: | |
branches: [ master, develop, release*, feature* ] | |
pull_request: | |
branches: [ master, develop, release*, feature* ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.6.12] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install system dependencies (clang) | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev | |
- name: Install pyenv | |
run: | | |
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash | |
- name: Install system dependencies (python) | |
run: | | |
export PYENV_ROOT="$HOME/.pyenv" | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init --path)" | |
CC=clang pyenv install 3.6.12 -v | |
sudo ln -sf $PYENV_ROOT/versions/3.6.12/bin/python3.6 /usr/local/bin/python3.6 | |
- name: Install modules | |
run: | | |
python3.6 -m pip install --upgrade pip | |
python3.6 -m pip install -r requirements.txt -i https://mirrors.tencent.com/pypi/simple/ | |
- name: Run Tests | |
run: | | |
# prepare env | |
source scripts/develop/sites/community/env.sh | |
export APP_ID="bk_sops" | |
export APP_TOKEN="{APP_TOKEN}" | |
export BK_PAAS_HOST="BK_PAAS_HOST" | |
export BK_CC_HOST="" | |
export BK_JOB_HOST="" | |
export RUN_VER="open" | |
export OPEN_VER="community" | |
export BKAPP_AUTO_UPDATE_VARIABLE_MODELS="0" | |
export BKAPP_AUTO_UPDATE_COMPONENT_MODELS="0" | |
export BK_IAM_HOST="BK_IAM_HOST" | |
export BK_API_URL_TMPL="BK_API_URL_TMPL" | |
# add local_settings.py | |
echo '# -*- coding: utf-8 -*- | |
DATABASES = { | |
"default": { | |
"ENGINE": "django.db.backends.sqlite3", | |
"NAME": "db.sqlite3", | |
} | |
} | |
LOG_LEVEL = "DEBUG" | |
BK_IAM_SKIP = 1' > local_settings.py | |
# rm pipeline tests, we will not longer need it after integrate with bamboo-engine | |
rm -rf pipeline/tests | |
# run unittest | |
python3.6 -m coverage run manage.py test | |
- name: Coverage export | |
run: | | |
# export xml | |
python3.6 -m coverage xml | |
# print report | |
python3.6 -m coverage report | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |