diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c24ba7d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,102 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + fail-fast: false + matrix: + showcase: + - "ai/slackbot-mcp-client/no-auth" + - "ai/slackbot-mcp-client/rich-responses/mcp-apps" + - "ai/slackbot-mcp-client/slack-identity" + - "block-kit" + - "methods" + defaults: + run: + working-directory: ${{ matrix.showcase }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: "3.15" + - name: Install dependencies + run: | + pip install -U pip + pip install -r requirements.txt + - name: Lint and check formatting + run: | + ruff check . + ruff format --diff --check . + typecheck: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + fail-fast: false + matrix: + showcase: + - "ai/slackbot-mcp-client/no-auth" + - "ai/slackbot-mcp-client/rich-responses/mcp-apps" + - "ai/slackbot-mcp-client/slack-identity" + - "block-kit" + - "methods" + defaults: + run: + working-directory: ${{ matrix.showcase }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: "3.15" + - name: Install dependencies + run: | + pip install -U pip + pip install -r requirements.txt + - name: Type check + run: | + mypy . + test: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + fail-fast: false + matrix: + showcase: + - "ai/slackbot-mcp-client/no-auth" + - "ai/slackbot-mcp-client/rich-responses/mcp-apps" + - "ai/slackbot-mcp-client/slack-identity" + - "block-kit" + defaults: + run: + working-directory: ${{ matrix.showcase }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: "3.15" + - name: Install dependencies + run: | + pip install -U pip + pip install -r requirements.txt + - name: Run all tests + run: | + pytest -v diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 3503800..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Test -on: - push: - branches: - - main - pull_request: -jobs: - test: - name: "pytest@python3.14" - runs-on: ubuntu-latest - permissions: - contents: read - strategy: - fail-fast: false - matrix: - showcase: - - "ai/slackbot-mcp-client/no-auth" - - "ai/slackbot-mcp-client/rich-responses/mcp-apps" - - "ai/slackbot-mcp-client/slack-identity" - - "block-kit" - - "methods" - steps: - - name: Checkout code - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - name: Install Python - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 - with: - python-version: "3.14" - - name: Run tests - run: | - cd "${{ matrix.showcase }}" - pip install -r requirements.txt - ruff check - ruff format --diff --check - mypy . - if [ -d tests ]; then pytest -v; fi