Skip to content
Draft
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
13 changes: 9 additions & 4 deletions .github/workflows/create-block.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Create Block

on:
pull_request:
push:
branches: [trunk, wp/trunk]

workflow_run:
workflows: [ "Prime Caches" ]
types:
- completed
#
# pull_request:
# push:
# branches: [trunk, wp/trunk]
#
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: End-to-End Tests

on:
pull_request:
push:
branches:
- trunk
- 'release/**'
- 'wp/**'
workflow_run:
workflows:
- Prime Caches
types:
- completed

# pull_request:
# push:
# branches:
# - trunk
# - 'release/**'
# - 'wp/**'

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Performances Tests

on:
pull_request:
release:
types: [published]
workflow_run:
workflows: [ "Prime Caches" ]
types:
- completed
#
# pull_request:
# release:
# types: [published]

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/prime-caches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
##
# This workflow primes the NPM caches in order to speed up other workflows.
##
name: Prime Caches

on:
pull_request:
push:
branches:
- trunk
- 'release/**'
- 'wp/**'

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
prime-npm-cache:
name: NodeJS ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest']
node: ['14', '12']

include:
- os: 'macos-latest'
node: '14'

steps:
- name: Checkout repository
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4

- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: ${{ matrix.node }}

- name: Cache NPM packages
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
id: npm-cache
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}

- name: Prime cache
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
11 changes: 8 additions & 3 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: React Native E2E Tests (Android)

on:
pull_request:
push:
branches: [trunk]
workflow_run:
workflows: [ "Prime Caches" ]
types:
- completed

# pull_request:
# push:
# branches: [trunk]

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: React Native E2E Tests (iOS)

on:
pull_request:
push:
branches: [trunk]
workflow_run:
workflows: [ "Prime Caches" ]
types:
- completed

# pull_request:
# push:
# branches: [trunk]

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: Static Analysis (Linting, License, Type checks...)

on:
pull_request:
push:
branches:
- trunk
- 'release/**'
- 'wp/**'
workflow_run:
workflows: [ "Prime Caches" ]
types:
- completed

# pull_request:
# push:
# branches:
# - trunk
# - 'release/**'
# - 'wp/**'

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ name: Unit Tests
# Since Unit Tests are required to pass for each PR,
# we cannot disable them for documentation-only changes.
on:
pull_request:
push:
branches:
- trunk
- 'release/**'
- 'wp/**'
workflow_run:
workflows: [ "Prime Caches" ]
types:
- completed

# pull_request:
# push:
# branches:
# - trunk
# - 'release/**'
# - 'wp/**'

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
Expand Down