Browse Source

Try to skip extra checks in the CI for up to date PRs in merge queue. (#1010)

* Try to skip extra checks in the CI for up to date PRs in merge queue.

* Try to simplify check

* Remove expression syntax from `if`s
pull/1012/head
Jorge Martin Espinosa 1 year ago committed by GitHub
parent
commit
ca3e284991
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .github/workflows/build.yml
  2. 1
      .github/workflows/danger.yml
  3. 1
      .github/workflows/gradle-wrapper-validation.yml
  4. 2
      .github/workflows/quality.yml
  5. 1
      .github/workflows/tests.yml
  6. 1
      .github/workflows/validate-lfs.yml

3
.github/workflows/build.yml

@ -16,7 +16,7 @@ jobs: @@ -16,7 +16,7 @@ jobs:
debug:
name: Build debug APKs
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
if: github.ref != 'refs/heads/main' && github.event.merge_group.base_ref != 'refs/heads/develop'
strategy:
fail-fast: false
# Allow all jobs on develop. Just one per PR.
@ -24,6 +24,7 @@ jobs: @@ -24,6 +24,7 @@ jobs:
group: ${{ github.ref == 'refs/heads/develop' && format('build-develop-{0}', github.sha) || format('build-debug-{0}', github.ref) }}
cancel-in-progress: true
steps:
- run: echo ${{ github.event.merge_group.base_ref }}
- uses: actions/checkout@v3
with:
# Ensure we are building the branch and not the branch after being merged on develop

1
.github/workflows/danger.yml

@ -5,6 +5,7 @@ on: [pull_request, merge_group] @@ -5,6 +5,7 @@ on: [pull_request, merge_group]
jobs:
build:
runs-on: ubuntu-latest
if: github.event.merge_group.base_ref != 'refs/heads/develop'
name: Danger main check
steps:
- uses: actions/checkout@v3

1
.github/workflows/gradle-wrapper-validation.yml

@ -8,6 +8,7 @@ on: @@ -8,6 +8,7 @@ on:
jobs:
validation:
name: "Validation"
if: github.event.merge_group.base_ref != 'refs/heads/develop'
runs-on: ubuntu-latest
# No concurrency required, this is a prerequisite to other actions and should run every time.
steps:

2
.github/workflows/quality.yml

@ -16,6 +16,7 @@ jobs: @@ -16,6 +16,7 @@ jobs:
checkScript:
name: Search for forbidden patterns
runs-on: ubuntu-latest
if: github.event.merge_group.base_ref != 'refs/heads/develop'
steps:
- uses: actions/checkout@v3
- name: Run code quality check suite
@ -24,6 +25,7 @@ jobs: @@ -24,6 +25,7 @@ jobs:
check:
name: Project Check Suite
runs-on: ubuntu-latest
if: github.event.merge_group.base_ref != 'refs/heads/develop'
# Allow all jobs on main and develop. Just one per PR.
concurrency:
group: ${{ github.ref == 'refs/heads/main' && format('check-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-develop-{0}', github.sha) || format('check-{0}', github.ref) }}

1
.github/workflows/tests.yml

@ -16,6 +16,7 @@ jobs: @@ -16,6 +16,7 @@ jobs:
tests:
name: Runs unit tests
runs-on: ubuntu-latest
if: github.event.merge_group.base_ref != 'refs/heads/develop'
# Allow all jobs on main and develop. Just one per PR.
concurrency:

1
.github/workflows/validate-lfs.yml

@ -5,6 +5,7 @@ on: [pull_request, merge_group] @@ -5,6 +5,7 @@ on: [pull_request, merge_group]
jobs:
build:
runs-on: ubuntu-latest
if: github.event.merge_group.base_ref != 'refs/heads/develop'
name: Validate
steps:
- uses: nschloe/action-cached-lfs-checkout@v1.2.1

Loading…
Cancel
Save