Skip to content

(blue-krill) v2.0.3 #57

(blue-krill) v2.0.3

(blue-krill) v2.0.3 #57

Workflow file for this run

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.7
- name: Format with isort
run: |
pip install isort==5.9.2
isort sdks/ --settings-path=sdks/bkpaas-auth/pyproject.toml
- name: Format with black
run: |
pip install black==21.7b0 click==8.0.4
black sdks/ --config=sdks/bkpaas-auth/pyproject.toml
- name: Lint with flake8
run: |
pip install flake8==4.0.1 pyproject-flake8==0.0.1a4
pflake8 sdks/ --config=sdks/bkpaas-auth/pyproject.toml
- name: Lint with mypy
run: |
pip install mypy==0.910 types-requests==2.25.0 types-setuptools==57.0.0 types-dataclasses==0.1.5 types-six==0.1.7 types-toml==0.1.3
mypy sdks/bkpaas-auth --config-file=sdks/bkpaas-auth/pyproject.toml
test:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
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.1.13
- 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.1.13
- 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/*