From 0f1d27f5820b90d135c8724bc1d7dde62bbc4068 Mon Sep 17 00:00:00 2001 From: Roger Vinas Date: Mon, 22 Jul 2024 17:04:25 +0200 Subject: [PATCH] Refactor CI --- .github/workflows/bash.yml | 4 ++-- .github/workflows/dotnet.yml | 4 ++-- .github/workflows/go.yml | 4 ++-- .github/workflows/java.yml | 21 ++++++--------------- .github/workflows/javascript.yml | 4 ++-- .github/workflows/kotlin.yml | 21 ++++++--------------- .github/workflows/python.yml | 4 ++-- .github/workflows/ruby.yml | 4 ++-- .github/workflows/rust.yml | 4 ++-- .github/workflows/scala.yml | 12 ++++++------ 10 files changed, 32 insertions(+), 50 deletions(-) diff --git a/.github/workflows/bash.yml b/.github/workflows/bash.yml index 98cf608..5aca329 100644 --- a/.github/workflows/bash.yml +++ b/.github/workflows/bash.yml @@ -2,12 +2,12 @@ name: Bash on: push: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/bash.yml - bash/** pull_request: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/bash.yml - bash/** diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9deb54f..a79a700 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -2,12 +2,12 @@ name: .NET on: push: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/dotnet.yml - dotnet/** pull_request: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/dotnet.yml - dotnet/** diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5077977..dddca04 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,12 +2,12 @@ name: Go on: push: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/go.yml - go/** pull_request: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/go.yml - go/** diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index f04f4e0..5505a00 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -2,12 +2,12 @@ name: Java on: push: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/java.yml - java/** pull_request: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/java.yml - java/** @@ -24,21 +24,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Configure Java + - name: Set up Java uses: actions/setup-java@v4 with: - java-version: '21' - distribution: 'temurin' - - - name: Gradle cache - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-java-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-java + java-version: 21 + distribution: temurin + cache: gradle - name: Build uses: gradle/actions/setup-gradle@v3 diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index ffd8f11..ec2f59d 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -2,12 +2,12 @@ name: JavaScript on: push: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/javascript.yml - javascript/** pull_request: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/javascript.yml - javascript/** diff --git a/.github/workflows/kotlin.yml b/.github/workflows/kotlin.yml index 9387fe4..8149d43 100644 --- a/.github/workflows/kotlin.yml +++ b/.github/workflows/kotlin.yml @@ -2,12 +2,12 @@ name: Kotlin on: push: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/kotlin.yml - kotlin/** pull_request: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/kotlin.yml - kotlin/** @@ -24,21 +24,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Configure Java + - name: Set up Java uses: actions/setup-java@v4 with: - java-version: '21' - distribution: 'temurin' - - - name: Gradle cache - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-kotlin-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-kotlin + java-version: 21 + distribution: temurin + cache: gradle - name: Build uses: gradle/actions/setup-gradle@v3 diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index a755405..e63c999 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -2,12 +2,12 @@ name: Python on: push: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/python.yml - python/** pull_request: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/python.yml - python/** diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index b2fbb73..22a37de 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -2,12 +2,12 @@ name: Ruby on: push: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/ruby.yml - ruby/** pull_request: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/ruby.yml - ruby/** diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a817f1b..9700d63 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,12 +2,12 @@ name: Rust on: push: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/rust.yml - rust/** pull_request: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/rust.yml - rust/** diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 31ec3d7..dd2d3fb 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -2,12 +2,12 @@ name: Scala on: push: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/scala.yml - scala/** pull_request: - branches: [ "main" ] + branches: [ main ] paths: - .github/workflows/scala.yml - scala/** @@ -28,12 +28,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Configure Java + - name: Set up Java uses: actions/setup-java@v4 with: - java-version: '21' - distribution: 'temurin' - cache: 'sbt' + java-version: 21 + distribution: temurin + cache: sbt - name: Test run: sbt test