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

Ft tenant init #1045

Merged
merged 5 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 26 additions & 26 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: ESLint

on:
push:
branches: [ master, develop, pre_*, ft_* ]
pull_request:
branches: [ master, develop, pre_*, ft_* ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12.16.3
cache: 'npm'
cache-dependency-path: 'src/pages/package-lock.json'
- name: Install modules
run: |
cd src/pages
npm i
- name: Run ESLint
run: |
cd src/pages
npx eslint --ext .js,.vue src/
#name: ESLint
#
#on:
# push:
# branches: [ master, develop, pre_*, ft_* ]
# pull_request:
# branches: [ master, develop, pre_*, ft_* ]
#
#jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 12.16.3
# cache: 'npm'
# cache-dependency-path: 'src/pages/package-lock.json'
# - name: Install modules
# run: |
# cd src/pages
# npm i
# - name: Run ESLint
# run: |
# cd src/pages
# npx eslint --ext .js,.vue src/
74 changes: 37 additions & 37 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
name: Python CI Check

on:
push:
branches: [ master, develop, pre_*, ft_* ]
pull_request:
branches: [ master, develop, pre_*, ft_* ]

jobs:
build:

strategy:
fail-fast: false
matrix:
python-version: [3.8.10]
poetry-version: [1.4.2]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry==${{ matrix.poetry-version }}
- name: Export requirements.txt
run: poetry export -f requirements.txt --dev --without-hashes -o requirements.txt --no-ansi
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install dependencies
run: pip install -r requirements.txt -i https://pypi.org/simple/
- name: Lint with flake8
run: pflake8 src/ --config=pyproject.toml
- name: Lint with mypy
run: mypy src/ --config-file=pyproject.toml
#name: Python CI Check
#
#on:
# push:
# branches: [ master, develop, pre_*, ft_* ]
# pull_request:
# branches: [ master, develop, pre_*, ft_* ]
#
#jobs:
# build:
#
# strategy:
# fail-fast: false
# matrix:
# python-version: [3.8.10]
# poetry-version: [1.4.2]
# os: [ubuntu-20.04]
# runs-on: ${{ matrix.os }}
#
# steps:
# - uses: actions/checkout@v3
# - name: Install poetry
# run: pipx install poetry==${{ matrix.poetry-version }}
# - name: Export requirements.txt
# run: poetry export -f requirements.txt --dev --without-hashes -o requirements.txt --no-ansi
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# cache: 'pip'
# cache-dependency-path: 'requirements.txt'
# - name: Install dependencies
# run: pip install -r requirements.txt -i https://pypi.org/simple/
# - name: Lint with flake8
# run: pflake8 src/ --config=pyproject.toml
# - name: Lint with mypy
# run: mypy src/ --config-file=pyproject.toml
134 changes: 67 additions & 67 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
name: Unittest

on:
push:
branches: [ master, develop, pre_*, ft_* ]
pull_request:
branches: [ master, develop, pre_*, ft_* ]

jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: [3.6.14]
poetry-version: [1.1.7]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}

env:
DB_DATABASE: bk_user_api_test
DB_USER: root
DB_PASSWORD: root
DB_PORT: 3306

steps:
- uses: actions/checkout@v3
- uses: samin/mysql-action@v1.3
with:
mysql version: '5.7'
mysql database: ${{ env.DB_DATABASE }}
mysql root password: ${{ env.DB_PASSWORD }}
mysql user: ${{ env.DB_USER }}
mysql password: ${{ env.DB_PASSWORD }}
- name: Install poetry
run: pipx install poetry==${{ matrix.poetry-version }}
- name: Export requirements.txt
run: |
cd src/api/
bash bin/export_requirements_txt.sh
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'src/api/requirements.txt'
- name: Install dependencies
run: |
cd src/api/
pip install -r requirements.txt -i https://pypi.org/simple/
- name: Run api unittest
env:
DJANGO_SETTINGS_MODULE: "bkuser_core.config.overlays.unittest"
BK_PAAS_URL: "http://bkpaas.example.com"
BK_IAM_V3_INNER_HOST: "http://bkiam.example.com"
BK_APP_CODE: "bk-user"
BK_APP_SECRET: "some-default-token"
CELERY_BROKER_URL: "redis://:passwordG@localhost:32768/0"
CELERY_RESULT_BACKEND: "redis://:passwordG@localhost:32768/0"
DB_NAME: ${{ env.DB_DATABASE }}
DB_USER: ${{ env.DB_USER }}
DB_PASSWORD: ${{ env.DB_PASSWORD }}
DB_HOST: "127.0.0.1"
DB_PORT: ${{ env.DB_PORT }}
run: |
make link
cd src/api
poetry run pytest bkuser_core/tests --disable-pytest-warnings
#name: Unittest
#
#on:
# push:
# branches: [ master, develop, pre_*, ft_* ]
# pull_request:
# branches: [ master, develop, pre_*, ft_* ]
#
#jobs:
# build:
# strategy:
# fail-fast: false
# matrix:
# python-version: [3.6.14]
# poetry-version: [1.1.7]
# os: [ubuntu-20.04]
# runs-on: ${{ matrix.os }}
#
# env:
# DB_DATABASE: bk_user_api_test
# DB_USER: root
# DB_PASSWORD: root
# DB_PORT: 3306
#
# steps:
# - uses: actions/checkout@v3
# - uses: samin/mysql-action@v1.3
# with:
# mysql version: '5.7'
# mysql database: ${{ env.DB_DATABASE }}
# mysql root password: ${{ env.DB_PASSWORD }}
# mysql user: ${{ env.DB_USER }}
# mysql password: ${{ env.DB_PASSWORD }}
# - name: Install poetry
# run: pipx install poetry==${{ matrix.poetry-version }}
# - name: Export requirements.txt
# run: |
# cd src/api/
# bash bin/export_requirements_txt.sh
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# cache: 'pip'
# cache-dependency-path: 'src/api/requirements.txt'
# - name: Install dependencies
# run: |
# cd src/api/
# pip install -r requirements.txt -i https://pypi.org/simple/
# - name: Run api unittest
# env:
# DJANGO_SETTINGS_MODULE: "bkuser_core.config.overlays.unittest"
# BK_PAAS_URL: "http://bkpaas.example.com"
# BK_IAM_V3_INNER_HOST: "http://bkiam.example.com"
# BK_APP_CODE: "bk-user"
# BK_APP_SECRET: "some-default-token"
# CELERY_BROKER_URL: "redis://:passwordG@localhost:32768/0"
# CELERY_RESULT_BACKEND: "redis://:passwordG@localhost:32768/0"
# DB_NAME: ${{ env.DB_DATABASE }}
# DB_USER: ${{ env.DB_USER }}
# DB_PASSWORD: ${{ env.DB_PASSWORD }}
# DB_HOST: "127.0.0.1"
# DB_PORT: ${{ env.DB_PORT }}
# run: |
# make link
# cd src/api
# poetry run pytest bkuser_core/tests --disable-pytest-warnings
8 changes: 0 additions & 8 deletions src/api/.coveragerc

This file was deleted.

39 changes: 0 additions & 39 deletions src/api/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions src/api/__init__.py

This file was deleted.

8 changes: 0 additions & 8 deletions src/api/bin/export_requirements_txt.sh

This file was deleted.

7 changes: 0 additions & 7 deletions src/api/bin/migrate_iam.sh

This file was deleted.

6 changes: 0 additions & 6 deletions src/api/bin/start.sh

This file was deleted.

2 changes: 0 additions & 2 deletions src/api/bin/start_beat.sh

This file was deleted.

2 changes: 0 additions & 2 deletions src/api/bin/start_celery.sh

This file was deleted.

7 changes: 0 additions & 7 deletions src/api/bin/start_dev.sh

This file was deleted.

Loading