Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 34 additions & 12 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
name: Build and Test
on: [workflow_dispatch, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: read
checks: write
id-token: write

name: "Build and Test"
on: [push, pull_request]
jobs:
js-test:
name: "JS Tests"
name: JS Tests
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -12,7 +22,7 @@ jobs:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
steps:
- name: "Checkout Branch"
- name: Checkout Branch
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
Expand All @@ -23,24 +33,36 @@ jobs:
- name: "NPM Test"
run: npm test
android-test:
name: "Android Unit Tests"
name: Android Unit Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./plugin
steps:
- name: "Checkout Branch"
- name: Checkout Branch
uses: actions/checkout@v2
- name: "Install JDK 11"
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "11"
- name: "Install NPM"
distribution: zulu
java-version: 11
- name: Install NPM
uses: actions/setup-node@v1
- name: "NPM Build"
- name: NPM Build
run: |
npm ci
npm run build --if-present
- name: "Run Unit Tests"
run: ./gradlew test
- name: Run Unit Tests
run: ./gradlew test

pr-notify:
if: >
github.event_name == 'pull_request' &&
github.event.pull_request.draft == false
needs:
- js-test
- android-test
name: Notify GChat
uses: ROKT/rokt-workflows/.github/workflows/oss_pr_opened_notification.yml@main
secrets:
gchat_webhook: ${{ secrets.GCHAT_PRS_WEBHOOK }}