Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflow #61

Closed
wants to merge 2 commits into from
Closed
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
63 changes: 20 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,15 @@ on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
cancel-previous:
name: Cancel Previous Jobs
permissions:
contents: read
actions: write
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Build
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
concurrency:
group: ${{ github.workflow }} - ${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
permissions:
contents: read
runs-on: ubuntu-latest
needs: cancel-previous
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -43,12 +29,9 @@ jobs:
- name: Lint
run: make clean lint

build:
name: Build
permissions:
contents: read
test:
name: Test (unit)
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -62,17 +45,13 @@ jobs:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: APK
run: make clean assemble
- name: Bundle
run: make clean bundle
- name: Test
run: make clean test

test:
name: Test (unit)
permissions:
contents: read
runs-on: ubuntu-latest
needs: build
androidTest:
name: Test (instrumented)
runs-on: macos-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -86,16 +65,11 @@ jobs:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Test
run: make clean test

androidTest:
name: Test (instrumented)
permissions:
contents: read
runs-on: macos-latest
timeout-minutes: 45
needs: test
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, test, androidTest]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -109,4 +83,7 @@ jobs:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'

- name: APK
run: make clean assemble
- name: Bundle
run: make clean bundle
Loading