Files
simplex-chat/.github/workflows/packages.yml
T
Evgeny @ SimpleX Chat 85ba221d79 ci: reduced build of changed scopes on drafts and manual runs (#7870)
* ci: reduced build of changed scopes on drafts and manual runs

* ci: tests only when selected in reduced builds

* ci: test selection and retries in scripts/ci/run-tests.sh
2026-10-26 11:19:50 +00:00

75 lines
2.0 KiB
YAML

name: packages
on:
pull_request:
paths:
- "packages/simplex-chat-nodejs/**"
- "packages/simplex-chat-client/types/typescript/**"
- "packages/simplex-chat-python/**"
- ".github/workflows/packages.yml"
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
# build.yml and this workflow both run for a pull request that changes the core and the packages
group: ${{ github.workflow }}-packages-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
env:
NPM_SCOPE: ${{ vars.NPM_SCOPE }}
PYPI_PROJECT: ${{ vars.PYPI_PROJECT }}
PYPI_URL: ${{ vars.PYPI_URL }}
jobs:
addon:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
outputs:
platforms: ${{ steps.plan.outputs.platforms }}
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Build plan
id: plan
env:
BASE: ${{ github.event.pull_request.base.sha }}
run: |
git fetch -q --depth=1 origin "$BASE"
python3 scripts/ci/packages_release.py build-plan --base "$BASE" >> "$GITHUB_OUTPUT"
build:
name: "build ${{ matrix.platform }}"
needs: addon
if: needs.addon.outputs.platforms != '[]'
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.addon.outputs.platforms) }}
defaults:
run:
shell: bash
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 22
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Build simplex-chat (npm) and add-on
run: scripts/ci/package-tests.sh build ${{ matrix.platform }}
- name: Test simplex-chat (npm and PyPI)
run: scripts/ci/package-tests.sh test