Skip to content

Commit

Permalink
[CI] Skip compile job when not on main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc2822 committed Aug 13, 2024
1 parent 3776b50 commit 3483a11
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/test-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ concurrency:

jobs:
compile:
name: Compile and cache
name: Compile and create build cache (main branch)
if: ${{ github.ref == 'refs/heads/main-ose' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -31,6 +32,7 @@ jobs:

test:
needs: compile
if: ${{ always() }} # even if compile didn't run (because not on main branch)
name: Tests without emulator
runs-on: ubuntu-latest
steps:
Expand All @@ -52,6 +54,7 @@ jobs:
# generates the build caches because it uses more gradle dependencies
test_on_emulator:
needs: compile
if: ${{ always() }} # even if compile didn't run (because not on main branch)
name: Tests with emulator
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 3483a11

Please sign in to comment.