diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..abca689 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + workflow_dispatch: + inputs: + run_benchmark: + description: 'Run benchmark' + required: false + default: 'false' + type: choice + options: + - 'true' + - 'false' + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Run tests + run: npm test + + - name: Run benchmark + if: github.event.inputs.run_benchmark == 'true' + run: npm run bench \ No newline at end of file