release 0.2.0a1 #25
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: [ main, dev-*, feature/* ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.13"] | |
| env: | |
| B24_DOMAIN: ${{ secrets.B24_DOMAIN }} | |
| B24_WEBHOOK: ${{ secrets.B24_WEBHOOK }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install .[dev,test] | |
| - name: Lint (ruff) | |
| run: | | |
| ruff --version | |
| ruff check . | |
| - name: Detect changed paths | |
| id: filter | |
| uses: dorny/[email protected] | |
| with: | |
| filters: | | |
| scope_crm: | |
| - 'b24pysdk/scopes/crm/**' | |
| - 'tests/integration/crm/**' | |
| scope_user: | |
| - 'b24pysdk/scopes/user/**' | |
| - 'tests/integration/user/**' | |
| - name: Run crm tests | |
| if: ${{ steps.filter.outputs.scope_crm == 'true' }} | |
| run: | | |
| pytest tests/integration/crm/ -v --disable-warnings --maxfail=1 | |
| - name: Run user tests | |
| if: ${{ steps.filter.outputs.scope_user == 'true' }} | |
| run: | | |
| pytest tests/integration/user/ -v --disable-warnings --maxfail=1 | |
| - name: Run mandatory tests | |
| run: | | |
| pytest tests/ --ignore=tests/integration/ -v --disable-warnings --maxfail=1 | |
| docker-ci: | |
| runs-on: ubuntu-latest | |
| env: | |
| B24_DOMAIN: ${{ secrets.B24_DOMAIN }} | |
| B24_WEBHOOK: ${{ secrets.B24_WEBHOOK }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build CI Docker image | |
| run: | | |
| docker build \ | |
| -f docker/ci.Dockerfile \ | |
| --build-arg PYTHON_VERSION=3.13 \ | |
| -t b24pysdk-ci . | |
| - name: Detect changed paths | |
| id: filter | |
| uses: dorny/[email protected] | |
| with: | |
| filters: | | |
| scope_crm: | |
| - 'b24pysdk/scopes/crm/**' | |
| - 'tests/integration/crm/**' | |
| scope_user: | |
| - 'b24pysdk/scopes/user/**' | |
| - 'tests/integration/user/**' | |
| - name: Run crm tests in Docker | |
| if: ${{ steps.filter.outputs.scope_crm == 'true' }} | |
| run: | | |
| docker run --rm \ | |
| -e B24_DOMAIN=$B24_DOMAIN \ | |
| -e B24_WEBHOOK=$B24_WEBHOOK \ | |
| b24pysdk-ci \ | |
| pytest tests/integration/crm/ -v --disable-warnings --maxfail=1 | |
| - name: Run user tests in Docker | |
| if: ${{ steps.filter.outputs.scope_user == 'true' }} | |
| run: | | |
| docker run --rm \ | |
| -e B24_DOMAIN=$B24_DOMAIN \ | |
| -e B24_WEBHOOK=$B24_WEBHOOK \ | |
| b24pysdk-ci \ | |
| pytest tests/integration/user/ -v --disable-warnings --maxfail=1 | |
| - name: Run mandatory tests in Docker | |
| run: | | |
| docker run --rm \ | |
| -e B24_DOMAIN=$B24_DOMAIN \ | |
| -e B24_WEBHOOK=$B24_WEBHOOK \ | |
| b24pysdk-ci \ | |
| pytest tests/ --ignore=tests/integration/ -v --disable-warnings --maxfail=1 |