Skip to content

[wip] feat: Refactor change-tracking logic to db trigger #149

[wip] feat: Refactor change-tracking logic to db trigger

[wip] feat: Refactor change-tracking logic to db trigger #149

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: [main]
pull_request_target:
branches: [main]
types: [reopened, synchronize, opened]
jobs:
requires-approval:
runs-on: ubuntu-latest
name: "Waiting for PR approval as this workflow runs on pull_request_target"
if: github.event_name == 'pull_request_target' && github.event.pull_request.base.user.login != 'cap-js'
environment: pr-approval
steps:
- name: Approval Step
run: echo "This job has been approved!"
test:
runs-on: ubuntu-latest
needs: requires-approval
if: always() && !github.event.pull_request.draft && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x]
cds-version: [latest, 8]
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g @sap/cds-dk@${{ matrix.cds-version }}
- run: npm i
- run: cd tests/bookshop && npm i
- run: cd tests/bookshop-mtx && npm i
- run: npm run test
integration-tests:
runs-on: ubuntu-latest
needs: requires-approval
if: always() && !github.event.pull_request.draft && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
name: Integration Tests on Node.js ${{ matrix['node-version'] }} and CAP ${{ matrix['cds-version'] }}
strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x]
cds-version: [latest, 8]
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Integration tests
uses: ./.github/actions/integration-tests
with:
CF_API: ${{ secrets['CF_API'] }}
CF_USERNAME: ${{ secrets['CF_USERNAME'] }}
CF_PASSWORD: ${{ secrets['CF_PASSWORD'] }}
CF_ORG: ${{ secrets['CF_ORG'] }}
CF_SPACE: ${{ secrets['CF_SPACE'] }}
NODE_VERSION: ${{ matrix.node-version }}