Skip to content

Commit

Permalink
Update CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
romainbsl committed Apr 29, 2024
1 parent df76837 commit 919e444
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@ on:
types: [published]

jobs:
unit-tests:
uses: kosi-libs/kodein-internal-github-actions/.github/workflows/unit-tests.yml@main
instrumentation-tests:
uses: kosi-libs/kodein-internal-github-actions/.github/workflows/check-with-android.yml@main

create-staging-repository:
needs:
- unit-tests
- instrumentation-tests
uses: kosi-libs/kodein-internal-github-actions/.github/workflows/create-nexus-staging-repository.yml@main
secrets: inherit

build-upload:
upload-release:
needs: create-staging-repository
runs-on: macOS-latest
env:
Expand All @@ -20,14 +28,12 @@ jobs:
steps:
- name: Setup
uses: kosi-libs/kodein-internal-github-actions/setup@main
- name: Check with Android
uses: kosi-libs/kodein-internal-github-actions/checkWithAndroid@main
- name: Upload
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -Porg.kodein.sonatype.repositoryId=${{ needs.create-staging-repository.outputs.repository-id }}
shell: bash

drop-or-release-staging-repository:
needs: [create-staging-repository, build-upload]
needs: [create-staging-repository, upload]
if: ${{ always() && needs.create-staging-repository.result == 'success' }}
uses: kosi-libs/kodein-internal-github-actions/.github/workflows/drop-or-release-nexus-staging-repository.yml@main
secrets: inherit
Expand Down
22 changes: 3 additions & 19 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,11 @@ on:

jobs:
unit-tests:
name: Unit tests
runs-on: macOS-latest
steps:
- name: Setup
uses: kosi-libs/kodein-internal-github-actions/setup@main
- name: Check
run: ./gradlew check
shell: bash

uses: kosi-libs/kodein-internal-github-actions/.github/workflows/unit-tests.yml@main
instrumentation-tests:
name: Instrumentation tests
runs-on: ubuntu-latest
steps:
- name: Setup
uses: kosi-libs/kodein-internal-github-actions/setup@main
- name: Check with Android
uses: kosi-libs/kodein-internal-github-actions/checkWithAndroid@main
uses: kosi-libs/kodein-internal-github-actions/.github/workflows/check-with-android.yml@main

upload:
upload-snapshot:
needs:
- unit-tests
- instrumentation-tests
Expand All @@ -44,8 +30,6 @@ jobs:
steps:
- name: Setup
uses: kosi-libs/kodein-internal-github-actions/setup@main
- name: Gradle cache
uses: gradle/gradle-build-action@v3
- name: Upload
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -PgitRef=${{ github.ref }} -Psnapshot=true
shell: bash
13 changes: 12 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,19 @@ on:
- '!./github/workflow/test.yml'

jobs:
check:
unit-tests:
name: Unit tests
runs-on: macOS-latest
steps:
- name: Setup
uses: kosi-libs/kodein-internal-github-actions/setup@main
- name: Check
run: ./gradlew check
shell: bash

instrumentation-tests:
name: Instrumentation tests
runs-on: ubuntu-latest
steps:
- name: Setup
uses: kosi-libs/kodein-internal-github-actions/setup@main
Expand Down

0 comments on commit 919e444

Please sign in to comment.