Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update ci #1665

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions .github/workflows/teststate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ concurrency:
cancel-in-progress: true

jobs:
init:
if: (github.repository_owner == 'HXSecurityBusiness' && github.event_name == 'schedule') || github.repository_owner == 'HXSecurity'
runs-on: ubuntu-latest
steps:
- name: init
run: |
echo "HXSecurityBusiness"
Run-API-TEST:
if: (github.repository_owner == 'HXSecurityBusiness' && github.event_name == 'push') || github.repository_owner == 'HXSecurity'
runs-on: ubuntu-latest
needs:
- init
services:
mysql:
image: dongtai/dongtai-mysql-unittest:latest
Expand Down Expand Up @@ -73,7 +81,8 @@ jobs:
schemathesis run --base-url "http://localhost:8000/" -H 'Authorization: Token 67aebd78e700ad36a82a152276196b5f49fafeb0' http://localhost:8000/api/XZPcGFKoxYXScwGjQtJx8u/schema/ --hypothesis-suppress-health-check=data_too_large,filter_too_much,too_slow,large_base_example,function_scoped_fixture --validate-schema=false --hypothesis-verbosity normal

Run-BuildCheck:
if: (github.repository_owner == 'HXSecurityBusiness' && github.event_name == 'push') || github.repository_owner == 'HXSecurity'
needs:
- init
runs-on: ubuntu-latest
strategy:
max-parallel: 4
Expand Down Expand Up @@ -103,7 +112,8 @@ jobs:
registry.cn-hongkong.aliyuncs.com/secnium/dongtai-server-test:1.0.${{github.run_number}}

Run-MypyCheck:
if: (github.repository_owner == 'HXSecurityBusiness' && github.event_name == 'push') || github.repository_owner == 'HXSecurity'
needs:
- init
runs-on: ubuntu-latest
strategy:
max-parallel: 4
Expand All @@ -130,21 +140,24 @@ jobs:
mypy --show-error-codes --ignore-missing-imports --no-incremental --show-error-codes --check-untyped-defs --disable-error-code var-annotated --disable-error-code list-item --disable-error-code attr-defined --disable-error-code assignment --disable-error-code misc --disable-error-code union-attr --disable-error-code index --disable-error-code call-overload --disable-error-code dict-item --disable-error-code truthy-function --disable-error-code operator --disable-error-code name-defined .

Run-BlackCheck:
if: (github.repository_owner == 'HXSecurityBusiness' && github.event_name == 'push') || github.repository_owner == 'HXSecurity'
needs:
- init
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable

Run-RuffCheck:
if: (github.repository_owner == 'HXSecurityBusiness' && github.event_name == 'push') || github.repository_owner == 'HXSecurity'
needs:
- init
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1

Run-BanditCheck:
if: (github.repository_owner == 'HXSecurityBusiness' && github.event_name == 'push') || github.repository_owner == 'HXSecurity'
needs:
- init
runs-on: ubuntu-latest
strategy:
max-parallel: 4
Expand All @@ -171,7 +184,8 @@ jobs:
bandit -iii -lll -r .

Run-Unit-TEST:
if: (github.repository_owner == 'HXSecurityBusiness' && github.event_name == 'push') || github.repository_owner == 'HXSecurity'
needs:
- init
runs-on: ubuntu-latest
services:
mysql:
Expand Down Expand Up @@ -223,7 +237,8 @@ jobs:
coverage report

Run-Schema-Check:
if: (github.repository_owner == 'HXSecurityBusiness' && github.event_name == 'push') || github.repository_owner == 'HXSecurity'
needs:
- init
runs-on: ubuntu-latest

steps:
Expand All @@ -246,7 +261,8 @@ jobs:
run: python3 manage.py check_schema

analyze:
if: (github.repository_owner == 'HXSecurityBusiness' && github.event_name == 'push') || github.repository_owner == 'HXSecurity'
needs:
- init
name: Analyze
runs-on: ubuntu-latest
permissions:
Expand Down