apigw-manager-4.0.0 #83
Workflow file for this run
This file contains 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: CI Check for bkpaas-auth | |
on: | |
push: | |
branches: [master] | |
paths: | |
- "sdks/bkpaas-auth/**" | |
pull_request: | |
branches: [master] | |
paths: | |
- "sdks/bkpaas-auth/**" | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
check: | |
runs-on: macos-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Format with isort | |
working-directory: sdks/bkpaas-auth | |
run: | | |
pip install isort==5.12.0 | |
isort . --settings-path=pyproject.toml | |
- name: Format with black | |
working-directory: sdks/bkpaas-auth | |
run: | | |
pip install black==23.7.0 click==8.1.6 | |
black . --config=pyproject.toml | |
- name: Lint with flake8 | |
working-directory: sdks/bkpaas-auth | |
run: | | |
pip install flake8==4.0.1 pyproject-flake8==0.0.1a5 | |
pflake8 . --config=pyproject.toml | |
- name: Lint with mypy | |
working-directory: sdks/bkpaas-auth | |
run: | | |
pip install mypy==1.12.0 types-mock==4.0.15.2 types-requests==2.32.0.20241016 types-six==1.16.21.20241009 | |
mypy . --config-file=pyproject.toml | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.5.1 | |
- name: Install dependencies | |
working-directory: sdks/bkpaas-auth | |
run: | | |
poetry export --without-hashes --dev -o requirements-dev.txt | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements-dev.txt | |
python -m pip install tox-gh-actions==2.8.1 | |
- name: Run test with tox targets for ${{ matrix.python-version }} | |
working-directory: sdks/bkpaas-auth | |
run: tox | |
build: | |
runs-on: macos-latest | |
if: github.event.release && contains(github.event.release.tag_name, 'bkpaas-auth') | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Set up Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.5.1 | |
- name: Build bkpaas-auth | |
run: | | |
cd sdks/bkpaas-auth | |
poetry install | |
poetry build | |
echo "${{ github.event.relesae.tag_name }} ${{ github.sha }}" > Release.txt | |
cat Release.txt | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
Release.txt | |
sdks/bkpaas-auth/dist/* |