fix: avoid SIGPIPE error when getting probitas version #11
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Test (${{ matrix.os }}, ${{ matrix.probitas-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| probitas-version: [latest, 0.7.3] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Probitas | |
| uses: ./ | |
| id: setup | |
| with: | |
| probitas-version: ${{ matrix.probitas-version }} | |
| - name: Verify Outputs | |
| shell: bash | |
| run: | | |
| echo "Deno Version: ${{ steps.setup.outputs.deno-version }}" | |
| echo "Probitas Version: ${{ steps.setup.outputs.probitas-version }}" | |
| - name: Test Probitas CLI | |
| run: | | |
| probitas --version | |
| probitas --help | |
| - name: Create Test Scenario | |
| shell: bash | |
| run: | | |
| mkdir -p probitas | |
| cat > probitas/test.probitas.ts << 'EOF' | |
| import { scenario } from "jsr:@probitas/probitas"; | |
| export default scenario("Test Scenario") | |
| .step("Hello", () => { | |
| console.log("Hello from Probitas!"); | |
| return { success: true }; | |
| }) | |
| .build(); | |
| EOF | |
| - name: Run Probitas | |
| run: probitas run |