Skip to content

Commit

Permalink
Remove CircleCI and replace it with GitHub actions (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
amoraleda authored Oct 26, 2024
1 parent a08b1b0 commit 18afb46
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 50 deletions.
44 changes: 0 additions & 44 deletions .circleci/config.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: JFleet CI/CD

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
env:
# Customize the JVM maximum heap limit
JVM_OPTS: -Xmx3200m
TERM: dumb
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Build with Gradle
run: ./gradlew test --console=plain -i
# Jacoco and codecov
- name: Jacoco
run: ./gradlew jacocoTestReport
- name: codecov
run: bash <(curl -s https://codecov.io/bash)

build-latest:
runs-on: ubuntu-latest
env:
# Customize the JVM maximum heap limit
JVM_OPTS: -Xmx3200m
TERM: dumb
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Build with Gradle
run: ./gradlew test -Pmysql8 --console=plain -i
# Jacoco and codecov
- name: Jacoco
run: ./gradlew jacocoTestReport
- name: codecov
run: bash <(curl -s https://codecov.io/bash)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static org.jfleet.parameterized.IsMySql5Condition.isMySql5Present;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.jfleet.parameterized.Databases;
Expand All @@ -23,13 +24,14 @@ public class DatabaseContainers {

private static final Map<Databases, JdbcDatabaseContainer<?>> map = new HashMap<>();
static {
map.put(Postgres, createPostgresContainer());
map.put(JdbcPosgres, createPostgresContainer());
map.put(MySql, createMySqlContainer());
map.put(JdbcMySql, createMySqlContainer());
PostgreSQLContainer<?> postgresContainer = createPostgresContainer();
MySQLContainer<?> mysqlContainer = createMySqlContainer();
map.put(Postgres, postgresContainer);
map.put(JdbcPosgres, postgresContainer);
map.put(MySql, mysqlContainer);
map.put(JdbcMySql, mysqlContainer);

// Start all containers sequentially or some will not be properly initialized
map.values().forEach(GenericContainer::start);
List.of(postgresContainer, mysqlContainer).parallelStream().forEach(GenericContainer::start);
}

public static JdbcDatabaseContainer<?> getContainer(Databases database) {
Expand Down

0 comments on commit 18afb46

Please sign in to comment.