From 080e87e2affd59f365463ee89f66890a217acb64 Mon Sep 17 00:00:00 2001 From: Fabio Insolia Date: Mon, 27 Nov 2023 16:01:52 +0000 Subject: [PATCH] Adding ktlint always for every module --- .github/workflows/cleanup-artifacts.yml | 21 +++++++++++++++++++ .github/workflows/gradle-task.yml | 2 +- .github/workflows/verification-flow.yml | 6 ------ .github/workflows/verify-checkout.yml | 1 - .../workflows/verify-example-app-frames.yml | 1 - .github/workflows/verify-frames.yml | 1 - 6 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/cleanup-artifacts.yml diff --git a/.github/workflows/cleanup-artifacts.yml b/.github/workflows/cleanup-artifacts.yml new file mode 100644 index 00000000..55cde8b9 --- /dev/null +++ b/.github/workflows/cleanup-artifacts.yml @@ -0,0 +1,21 @@ +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + + schedule: + # Every day at 1am + - cron: '0 1 * * *' + +jobs: + remove-old-artifacts: + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Clean all artifacts + uses: c-hive/gha-remove-artifacts@v1 + with: + age: '60 seconds' # ' ', e.g. 5 days, 2 years, 90 seconds, parsed by Moment.js + # Optional inputs + # skip-tags: true + # skip-recent: 5 \ No newline at end of file diff --git a/.github/workflows/gradle-task.yml b/.github/workflows/gradle-task.yml index 157961b8..86c8f48a 100644 --- a/.github/workflows/gradle-task.yml +++ b/.github/workflows/gradle-task.yml @@ -36,5 +36,5 @@ jobs: ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - - name: Run unit tests with Gradle + - name: Run ${{ inputs.task }} with Gradle run: ./gradlew :${{ inputs.module }}:${{ inputs.task }} diff --git a/.github/workflows/verification-flow.yml b/.github/workflows/verification-flow.yml index e807d272..7fb6486a 100644 --- a/.github/workflows/verification-flow.yml +++ b/.github/workflows/verification-flow.yml @@ -7,11 +7,6 @@ on: description: 'Module to run' required: true type: string - run-ktlint: - description: 'Should Run Ktlint' - required: false - type: boolean - default: false assemble-variant: description: 'Variant to Run Assemble' required: false @@ -34,7 +29,6 @@ jobs: with: module: ${{ inputs.module }} ktlint: - if: ${{ inputs.run-ktlint }} uses: ./.github/workflows/ktlint.yml with: module: ${{ inputs.module }} diff --git a/.github/workflows/verify-checkout.yml b/.github/workflows/verify-checkout.yml index e4042fad..5a2438b1 100644 --- a/.github/workflows/verify-checkout.yml +++ b/.github/workflows/verify-checkout.yml @@ -22,4 +22,3 @@ jobs: secrets: inherit with: module: checkout - run-ktlint: true diff --git a/.github/workflows/verify-example-app-frames.yml b/.github/workflows/verify-example-app-frames.yml index 66655b56..e4ff8900 100644 --- a/.github/workflows/verify-example-app-frames.yml +++ b/.github/workflows/verify-example-app-frames.yml @@ -24,5 +24,4 @@ jobs: secrets: inherit with: module: example_app_frames - run-ktlint: true push-apk: true diff --git a/.github/workflows/verify-frames.yml b/.github/workflows/verify-frames.yml index 3915d751..43c2f84c 100644 --- a/.github/workflows/verify-frames.yml +++ b/.github/workflows/verify-frames.yml @@ -23,5 +23,4 @@ jobs: secrets: inherit with: module: frames - run-ktlint: true run-ui-test: true