Skip to content

feature:在错误检测页面中,可以直接点击文字复制 #170

feature:在错误检测页面中,可以直接点击文字复制

feature:在错误检测页面中,可以直接点击文字复制 #170

name: Client_Unit Test When commit.yml
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./YuYuWechatV2_Client
services:
redis:
image: redis:latest
ports:
- 6379:6379
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: tykWyr-bepqu6-fafvym
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
- name: Run migrations
env:
DATABASE_URL: postgres://postgres:tykWyr-bepqu6-fafvym@localhost:5432/test_db
REDIS_URL: redis://localhost:6379
run: python manage.py migrate
- name: Run tests with coverage
env:
DATABASE_URL: postgres://postgres:tykWyr-bepqu6-fafvym@localhost:5432/test_db
REDIS_URL: redis://localhost:6379
run: |
coverage run --source='.' manage.py test --verbosity=3
coverage report
coverage xml -o coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}