Add test publish workflow and update publish strategy #1
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: Test Publish (Dry Run) | |
| on: | |
| push: | |
| branches: | |
| - multi-language-support | |
| pull_request: | |
| branches: | |
| - multi-language-support | |
| jobs: | |
| test-js-packages: | |
| name: Test JS Packages (Core & SDK) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies (Root) | |
| run: npm ci | |
| - name: Build All Workspaces | |
| run: npm run build --workspaces | |
| - name: Test All Workspaces | |
| run: npm test --workspaces | |
| - name: Dry Run Publish pmxt-core | |
| run: npm publish --workspace=pmxt-core --dry-run | |
| - name: Dry Run Publish pmxtjs | |
| run: npm publish --workspace=pmxtjs --dry-run | |
| test-python-package: | |
| name: Test Python Package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install build tools & dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine pytest | |
| pip install . | |
| working-directory: sdks/python | |
| - name: Run Tests | |
| run: pytest | |
| working-directory: sdks/python | |
| - name: Build Package | |
| run: python -m build | |
| working-directory: sdks/python | |
| - name: Verify Package Metadata | |
| run: twine check dist/* | |
| working-directory: sdks/python |