-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c90d90b
commit 6f25f45
Showing
3 changed files
with
165 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: 'prepare' | ||
description: 'Composite action to setup java, gradle, docker' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4.2.1 | ||
with: | ||
java-version: 21 | ||
distribution: 'adopt' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: set up docker buildx | ||
uses: docker/setup-buildx-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
|
||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ gha ] | ||
env: | ||
JAVA_TOOL_OPTIONS: -Xmx4096m | ||
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=true -Dorg.gradle.workers.max=4 -Xmx4096m | ||
|
||
jobs: | ||
assemble: | ||
# 4 cpu, 16G ram | ||
runs-on: ubuntu-24.04 | ||
environment: dev | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Prepare | ||
uses: ./.github/actions/prepare | ||
|
||
- name: Assemble | ||
run: | | ||
./gradlew --no-daemon --parallel clean compileJava compileTestJava compileJmhJava compileIntegrationTestJava compileAcceptanceTestJava compilePropertyTestJava assemble | ||
# TODO: check why this is done | ||
# - run: | ||
# name: Prep Artifacts | ||
# command: | | ||
# mkdir /tmp/teku-distributions | ||
# cp build/distributions/*.tar.gz /tmp/teku-distributions/ | ||
|
||
- name: Upload workspace build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: workspace | ||
path: | | ||
./ | ||
!./.git/** | ||
retention-days: 7 | ||
|
||
unitTests: | ||
needs: assemble | ||
# 4 cpu, 16G ram | ||
runs-on: ubuntu-24.04 | ||
environment: dev | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Prepare | ||
uses: ./.github/actions/prepare | ||
|
||
- name: Download workspace build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: workspace | ||
|
||
- name: Unit Tests | ||
run: | | ||
export GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.workers.max=3" | ||
./gradlew test $GRADLE_ARGS | ||
integrationTests: | ||
needs: assemble | ||
# 4 cpu, 16G ram | ||
runs-on: ubuntu-24.04 | ||
environment: dev | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Prepare | ||
uses: ./.github/actions/prepare | ||
|
||
- name: Download workspace build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: workspace | ||
|
||
- name: Acceptance Tests | ||
run: | | ||
ls -la . | ||
./gradlew integrationTest | ||
# - name: Test results and report | ||
# uses: ./.github/actions/testResultsReports | ||
# with: | ||
# suiteName: 'acceptanceTests' | ||
|
||
|
||
# integrationTests: | ||
# executor: medium_plus_executor | ||
# steps: | ||
# - prepare | ||
# - attach_workspace: | ||
# at: ~/project | ||
# - run: | ||
# name: IntegrationTests | ||
# no_output_timeout: 20m | ||
# command: | | ||
# ./gradlew --no-daemon --parallel integrationTest | ||
# - notify | ||
# - capture_test_results | ||
# - store_artifacts: | ||
# path: build/test-results |