Taboola - add support to deferred billing #2604
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: Run tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - '*-legacy' | |
| pull_request_target: | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: test-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| checkout: | |
| name: "Check out source and install dependencies" | |
| timeout-minutes: 2 | |
| runs-on: ubuntu-latest | |
| outputs: | |
| ref: ${{ steps.info.outputs.ref }} | |
| commit: ${{ steps.info.outputs.commit }} | |
| branch: ${{ steps.info.outputs.branch }} | |
| fork: ${{ steps.info.outputs.fork }} | |
| base-branch: ${{ steps.info.outputs.base-branch }} | |
| base-commit: ${{ steps.info.outputs.base-commit }} | |
| steps: | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Checkout code (PR) | |
| id: checkout-pr | |
| if: ${{ github.event_name == 'pull_request_target' }} | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: refs/pull/${{ github.event.pull_request.number }}/head | |
| - name: Checkout code (push) | |
| id: checkout-push | |
| if: ${{ github.event_name == 'push' }} | |
| uses: actions/checkout@v5 | |
| - name: Commit info | |
| id: info | |
| run: | | |
| echo ref="${{ steps.checkout-pr.outputs.ref || steps.checkout-push.outputs.ref }}" >> $GITHUB_OUTPUT | |
| echo commit="${{ steps.checkout-pr.outputs.commit || steps.checkout-push.outputs.commit }}" >> $GITHUB_OUTPUT | |
| echo branch="${{ github.head_ref || github.ref }}" >> $GITHUB_OUTPUT | |
| echo fork="${{ (github.event.pull_request && github.event.pull_request.head.repo.owner.login != github.repository_owner) && github.event.pull_request.head.repo.owner.login || null }}" >> $GITHUB_OUTPUT | |
| echo base-branch="${{ github.event.pull_request.base.ref || github.ref }}" >> $GITHUB_OUTPUT | |
| echo base-commit="${{ github.event.pull_request.base.sha || github.event.before }}" >> $GITHUB_OUTPUT | |
| - name: Install dependencies | |
| uses: ./.github/actions/npm-ci | |
| - name: 'Save working directory' | |
| uses: ./.github/actions/save | |
| with: | |
| name: source | |
| lint: | |
| name: "Run linter" | |
| needs: checkout | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Restore source | |
| uses: ./.github/actions/load | |
| with: | |
| name: source | |
| - name: lint | |
| run: | | |
| npx eslint | |
| test-no-features: | |
| name: "Unit tests (all features disabled)" | |
| needs: checkout | |
| uses: ./.github/workflows/run-tests.yml | |
| with: | |
| chunks: 8 | |
| build-cmd: npx gulp precompile-all-features-disabled | |
| test-cmd: npx gulp test-all-features-disabled-nobuild | |
| browserstack: false | |
| secrets: | |
| BROWSERSTACK_USER_NAME: ${{ secrets.BROWSERSTACK_USER_NAME }} | |
| BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | |
| test: | |
| name: "Browser tests" | |
| needs: checkout | |
| uses: ./.github/workflows/browser-tests.yml | |
| secrets: | |
| BROWSERSTACK_USER_NAME: ${{ secrets.BROWSERSTACK_USER_NAME }} | |
| BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | |
| coveralls: | |
| name: Update coveralls | |
| needs: [checkout, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Restore source | |
| uses: ./.github/actions/load | |
| with: | |
| name: ${{ needs.test.outputs.coverage }} | |
| - name: Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| git-branch: ${{ needs.checkout.outputs.fork && format('{0}:{1}', needs.checkout.outputs.fork, needs.checkout.outputs.branch) || needs.checkout.outputs.branch }} | |
| git-commit: ${{ needs.checkout.outputs.commit }} | |
| compare-ref: ${{ needs.checkout.outputs.base-branch }} | |
| compare-sha: ${{ needs.checkout.outputs.base-commit }} |