Cypher Builder version 3 #2279
Workflow file for this run
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", "*.x", "*-dev"] | |
| pull_request: | |
| branches: ["main", "*.x", "*-dev"] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: "Check that build works" | |
| run: | | |
| npm ci | |
| npm run build --if-present | |
| - name: "Test" | |
| run: npm test | |
| examples: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| with: | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| npm install -g tsx | |
| - run: npm run build | |
| - name: Run Examples | |
| run: | | |
| examples=$(find ./examples -name "*.ts") | |
| for example in $examples; do | |
| echo "Run example $example" | |
| tsx $example > /dev/null | |
| exit_code=$? | |
| if [ $exit_code -ne 0 ]; then | |
| echo "Error executing $example" | |
| exit 1 | |
| fi | |
| done |