Skip to content

Commit

Permalink
Refactor CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rogervinas committed Jul 22, 2024
1 parent b4c18fe commit 0f1d27f
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand All @@ -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
Expand Down

0 comments on commit 0f1d27f

Please sign in to comment.