Bump the npm-all group across 11 directories with 30 updates #851
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: cd-samples | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| env: | |
| NODE_MINVERSION: '20' | |
| PYTHON_MINVERSION: '3.10' | |
| jobs: | |
| build-dotnet: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build dotnet Samples | |
| working-directory: ./samples/dotnet | |
| run: | | |
| dotnet build | |
| build-node: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # NOTE: keep first entry in sync with env.NODE_MINVERSION | |
| node-version: [20, 'latest'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install Node dependencies | |
| run: npm ci | |
| - name: Run lint | |
| run: npm run lint | |
| - name: Build all Node samples | |
| run: | | |
| for dir in samples/nodejs/*/; do | |
| if [ -f "$dir/package.json" ]; then | |
| echo "::group::Building $dir" | |
| (cd "$dir" && npm ci && npm run build) | |
| echo "::endgroup::" | |
| fi | |
| done | |
| build-python: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # NOTE: keep first entry in sync with env.PYTHON_MINVERSION | |
| python-version: ['3.10', '3.x'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build all Python samples | |
| run: | | |
| for dir in samples/python/*/; do | |
| if [ -f "$dir/requirements.txt" ]; then | |
| echo "::group::Building $dir" | |
| (cd "$dir" && pip install -r requirements.txt && python -m compileall src/ -q) | |
| echo "::endgroup::" | |
| fi | |
| done |