name: Tests on: push: branches: [main] pull_request: types: [opened, synchronize, reopened, auto_merge_enabled] # Allow parallel jobs on `main`, so that each commit is tested. For PRs, run only the latest commit. concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: test: runs-on: ubuntu-latest timeout-minutes: 20 name: Tests permissions: packages: write env: FORCE_COLOR: true strategy: fail-fast: true matrix: node: [22] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 with: node-version: ${{ matrix.node }} cache: 'npm' - run: npm ci - run: npm install -g @sap/cds-dk - run: npm run lint - id: hxe uses: ./.github/actions/hxe with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # testing - run: npm test -ws env: TAG: ${{ steps.hxe.outputs.TAG }} IMAGE_ID: ${{ steps.hxe.outputs.IMAGE_ID }} - name: sqlite driver (better-sqlite3)) run: npm test -w sqlite env: CDS_REQUIRES_DB_DRIVER: 'better-sqlite3' - name: sqlite driver (sql.js) run: npm test -w sqlite env: CDS_REQUIRES_DB_DRIVER: 'sql.js'