Scripts with no issue #4
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: Scripts with no issue | |
| env: | |
| TIMEOUT: 15 | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| scripts-for-module: | |
| strategy: | |
| matrix: | |
| module: [chalk, prom-client, swagger-stats, googleapis] | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18.20.4" | |
| - name: Install dev dependencies | |
| run: npm install tsx concurrently | |
| - name: Install module | |
| run: npm install ${{ matrix.module }} | |
| - name: Run tsx watch (npm run tsxWatch --module=<module>) | |
| run: | | |
| $job=Start-Job -ScriptBlock {npm run tsxWatch --module=${{ matrix.module }}} | |
| $job | Wait-Job -Timeout ${{ env.TIMEOUT }} | Out-Null | |
| $npm_script_output=$job | Receive-Job | |
| echo $npm_script_output | |
| If($npm_script_output | Select-String "Everything is fine!" -Quiet){exit 0}Else{exit 1} | |
| - name: Run concurrently with tsx without watch (npm run concurrently-without-watch --module=<module>}) | |
| run: | | |
| $job=Start-Job -ScriptBlock {npm run concurrently-without-watch --module=${{ matrix.module }}} | |
| $job | Wait-Job -Timeout ${{ env.TIMEOUT }} | Out-Null | |
| $npm_script_output=$job | Receive-Job | |
| echo $npm_script_output | |
| If($npm_script_output | Select-String "Everything is fine!" -Quiet){exit 0}Else{exit 1} | |
| - name: Run concurrently with tsx watch windows-hack (npm run watch-with-concurrently-hack --module=<module>) | |
| run: | | |
| $job=Start-Job -ScriptBlock {npm run watch-with-concurrently-hack --module=${{ matrix.module }}} | |
| $job | Wait-Job -Timeout ${{ env.TIMEOUT }} | Out-Null | |
| $npm_script_output=$job | Receive-Job | |
| echo $npm_script_output | |
| If($npm_script_output | Select-String "Everything is fine!" -Quiet){exit 0}Else{exit 1} |