name: Common Test

on:
  pull_request: 
  push:
    branches-ignore:
      - 'hotfix-*'   # excludes hotfix branches
      - 'release'

jobs:
  test:
    runs-on: ubuntu-latest
    env:
      CI_PIPELINE_ID: ${{github.run_number}}
      BILLING_PRIVATE_KEY: ${{secrets.TEST_BILLING_PRIVATE_KEY}}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: latest 
      - run: cd Common && bash test-setup.sh
      - run: cd Common && npm install && rm -rf build && npm run test
  