set defang-provider-handoff sample name #27
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 Scripts | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| paths: | |
| - "scripts/**" | |
| - "templates/**" | |
| - "samples/**/compose.yaml" | |
| - "samples/**/compose.yml" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "scripts/**" | |
| - "templates/**" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: scripts | |
| - name: Run tests | |
| run: npm test | |
| working-directory: scripts | |
| preview-workflows: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: scripts | |
| - name: Get changed samples | |
| run: ./scripts/check-modified-samples.sh > modified.txt | |
| - name: Preview workflows | |
| uses: actions/github-script@v7 | |
| env: | |
| DRY_RUN: "true" | |
| with: | |
| script: | | |
| const script = require('./scripts/template-manager.js') | |
| await script({github, context, core}); |