Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Nightly Tests

on:
workflow_dispatch:
schedule:
- cron: "0 5 * * 2,6" # cron is UTC, this translates to 10 PM PST Mon and Fri.
# This lets us trigger the workflow from a browser.
workflow_dispatch:

jobs:
ios-pr:
android-nightly:
strategy:
fail-fast: false
matrix:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Pull Request
on:
# Dangerious without Member Check setup!
pull_request_target:
branches:
- dev
branches: [dev, master]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI should run on master too. See this discussion.


jobs:
test-orchestrator:
Expand Down Expand Up @@ -38,7 +37,7 @@ jobs:
# We need a sufficient depth or Danger will occasionally run into issues checking which files were modified.
fetch-depth: 100
# This is dangerous without the member check
ref: ${{ github.head_ref }}
ref: ${{ github.event.pull_request.head.sha }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
Expand All @@ -58,4 +57,5 @@ jobs:
uses: ./.github/workflows/reusable-workflow.yaml
with:
lib: ${{ matrix.lib }}
is_pr: true
secrets: inherit
37 changes: 23 additions & 14 deletions .github/workflows/reusable-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
on:
workflow_dispatch:
workflow_call:
inputs:
lib:
required: true
type: string

workflow_call:
inputs:
lib:
required: true
type: string
is_pr:
type: boolean
default: false

jobs:
test-android:
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/.github/DangerFiles/Gemfile
steps:
- uses: actions/checkout@v4
if: ${{ inputs.is_pr }}
with:
# We need a sufficient depth or Danger will occasionally run into issues checking which files were modified.
fetch-depth: 100
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4
if: ${{ ! inputs.is_pr }}
with:
ref: ${{ github.head_ref }}
- name: Install Dependencies
env:
Expand All @@ -42,15 +49,16 @@ jobs:
with:
gradle-version: 8.7
- name: Run Lint
if: ${{ github.event_name }} == 'pull_request'
if: ${{ inputs.is_pr }}
run: |
./gradlew libs:${{ inputs.lib }}:lint
- uses: ruby/setup-ruby@v1
if: ${{ inputs.is_pr }}
with:
ruby-version: '3.2'
bundler-cache: true
- name: Report Static Analysis
if: ${{ github.event_name }} == 'pull_request'
if: ${{ inputs.is_pr }}
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LIB: ${{ inputs.lib }}
Expand All @@ -68,13 +76,14 @@ jobs:
if: success() || failure()
- name: Run Tests
if: success() || failure()
run: |
env:
# Most used according to https://gs.statcounter.com/android-version-market-share/mobile-tablet/worldwide
DEFAULT_API_VERSION="34"
FULL_API_RANGE="28 29 30 31 32 33 34 35"

DEFAULT_API_VERSION: "34"
FULL_API_RANGE: "28 29 30 31 32 33 34 35"
IS_PR: ${{ inputs.is_pr }}
run: |
DEVICES=""
if [[ ${{ github.event_name == 'pull_request' }} ]]; then
if $IS_PR ; then
DEVICES="--device model=MediumPhone.arm,version=${DEFAULT_API_VERSION},locale=en,orientation=portrait "
else
for LEVEL in $FULL_API_RANGE
Expand Down