-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
128 changed files
with
1,450 additions
and
2,113 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ mkShell { | |
|
||
buildInputs = [ | ||
unstable.nodejs_20 | ||
unstable.act | ||
chromium | ||
geckodriver | ||
jdk | ||
|
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,23 @@ | ||
# Setup a working environment without hassle using nix and direnv | ||
# For more information, visit https://direnv.net/ | ||
|
||
# Install node, npm and geckodriver by loading .env.chutney.nix expression | ||
use_nix .env.chutney.nix | ||
|
||
# Some tools (ex. Intellij) might need to configure paths to node, npm etc. | ||
# You can use following symlinks provided in .env folder | ||
|
||
## Create .env folder | ||
[[ ! -d .env.chutney ]] && mkdir .env.chutney && echo "Create .env.chutney folder" | ||
|
||
## Symlink npm home | ||
ln -sfn $(dirname "$(dirname "$(readlink -f $(which npm))")") .env.chutney/npm_home && echo "Symlink npm home dir" | ||
|
||
## Symlink JDK | ||
ln -sfn $JAVA_HOME .env.chutney/jdk && echo "Symlink jdk \"$JAVA_HOME\"" | ||
|
||
## Symlink Node | ||
ln -sfn $(readlink -f $(which node)) .env.chutney/node && echo "Symlink node \"$(readlink -f $(which node))" | ||
|
||
# Run npm install if needed | ||
[[ ! -d ./chutney/ui/node_modules ]] && echo "node_modules not found. Starting npm install" && cd ./chutney/ui && npm install && cd - |
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
File renamed without changes.
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,53 @@ | ||
name: 'build chutney' | ||
description: 'build chutney' | ||
inputs: | ||
goals: | ||
default: "clean install -V -B" | ||
description: "Maven goals to execute" | ||
cache-artifacts: | ||
default: "" | ||
description: "path of artifacts to be cached" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache node | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node' | ||
key: node_cache | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: node_module_cache | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file | ||
if: ${{ ! contains(inputs.goals, '-DskipTests') }} | ||
shell: bash | ||
run: | | ||
echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts | ||
- name: Build Chutney | ||
shell: bash | ||
run: | | ||
cd ./chutney | ||
echo "Running: ${{inputs.goals}}" | ||
mvn ${{ inputs.goals }} | ||
cd .. | ||
- name: Codecov | ||
if: ${{ ! contains(inputs.goals, '-DskipTests') }} | ||
uses: codecov/codecov-action@v3 | ||
|
||
- name: Temporarily cache jar artifacts | ||
if: inputs.cache-artifacts != '' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: chutney-artifacts | ||
path: ${{inputs.cache-artifacts}} | ||
retention-days: 1 | ||
overwrite: true | ||
|
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,31 @@ | ||
name: 'build all projects' | ||
description: 'build all projects sequentially' | ||
inputs: | ||
goals: | ||
default: "clean build :chutney-kotlin-dsl:publishToMavenLocal" | ||
description: "Gradle goals to execute" | ||
cache-artifacts: | ||
default: "" | ||
description: "path of artifacts to be cached" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build DSL | ||
shell: bash | ||
run: | | ||
cd ./kotlin-dsl | ||
echo "Running: ${{inputs.goals}}" | ||
./gradlew ${{inputs.goals}} :chutney-kotlin-dsl:publishToMavenLocal | ||
cd .. | ||
- name: Temporarily cache jar artifacts | ||
if: inputs.cache-artifacts != '' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dsl-artifacts | ||
path: ${{inputs.cache-artifacts}} | ||
retention-days: 1 | ||
overwrite: true |
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,31 @@ | ||
name: 'build all projects' | ||
description: 'build all projects sequentially' | ||
inputs: | ||
goals: | ||
default: "clean buildPlugin" | ||
description: "Gradle goals to execute" | ||
cache-artifacts: | ||
default: "" | ||
description: "path of artifacts to be cached" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build Plugin | ||
shell: bash | ||
run: | | ||
cd ./idea-plugin | ||
echo "Running: ${{inputs.goals}}" | ||
./gradlew ${{inputs.goals}} | ||
cd .. | ||
- name: Temporarily cache jar artifacts | ||
if: inputs.cache-artifacts != '' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: plugin-artifacts | ||
path: ${{inputs.cache-artifacts}} | ||
retention-days: 1 | ||
overwrite: true |
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,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: maven | ||
directory: "/chutney/" | ||
schedule: | ||
interval: monthly | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- dependencies |
File renamed without changes.
File renamed without changes.
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,158 @@ | ||
name: "Build all template" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
skipTests: | ||
default: false | ||
type: boolean | ||
description: "Skip tests if true" | ||
release: | ||
default: false | ||
type: boolean | ||
description: "Release if true" | ||
cache-artifacts: | ||
default: "" | ||
type: string | ||
description: "path of artifacts to be cached" | ||
server-id: | ||
type: string | ||
default: github | ||
description: "DistributionManagement repository id" | ||
|
||
secrets: | ||
gpg-private-key: | ||
description: "Chutney gpg private key" | ||
required: false | ||
gpg-passphrase: | ||
description: "Chutney gpg passphrase" | ||
required: false | ||
gpg-key-id: | ||
description: "Chutney gpg key id" | ||
required: false | ||
maven-username: | ||
description: "MAVEN_USERNAME secret" | ||
required: false | ||
maven-password: | ||
description: "MAVEN_PASSWORD secret" | ||
required: false | ||
github-token: | ||
description: "GITHUB_TOKEN secret" | ||
required: false | ||
|
||
outputs: | ||
PROJECT_VERSION: | ||
description: "Chutney Version" | ||
value: ${{ jobs.all.outputs.PROJECT_VERSION }} | ||
|
||
defaults: | ||
run: | ||
working-directory: . | ||
|
||
jobs: | ||
all: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'maven' | ||
server-id: ${{inputs.server-id}} | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.gpg-private-key }} | ||
gpg-passphrase: CHUTNEY_GPG_PASSPHRASE | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Retrieve chutney version from pom.xml | ||
id: get-version | ||
run: cd ./chutney && echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT && cd .. | ||
|
||
- name: Resolve chutney maven goal from inputs | ||
id: chutney-goals | ||
run: | | ||
skipTestArg="" | ||
mvnGoals="clean install" | ||
if ${{ inputs.skipTests }}; then | ||
skipTestArg="-DskipTests" | ||
fi | ||
if ${{ inputs.release }}; then | ||
mvnGoals="deploy -P ${{inputs.server-id}}" | ||
skipTestArg="-DskipTests" | ||
fi | ||
echo "CHUTNEY_GOALS=$mvnGoals $skipTestArg -V -B" >> $GITHUB_OUTPUT | ||
- name: Build Chutney | ||
id: build-chutney | ||
uses: ./.github/actions/build-chutney | ||
env: | ||
MAVEN_USERNAME: ${{secrets.maven-username}} | ||
MAVEN_PASSWORD: ${{secrets.maven-password}} | ||
CHUTNEY_GPG_PASSPHRASE: ${{ secrets.gpg-passphrase }} | ||
with: | ||
goals: ${{steps.chutney-goals.outputs.CHUTNEY_GOALS}} | ||
cache-artifacts: ${{ inputs.cache-artifacts }} | ||
|
||
- name: Install api-insecure | ||
shell: bash | ||
run: | | ||
mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file \ | ||
-Dfile=./chutney/packaging/local-api-unsecure/target/chutney-local-api-unsecure-${{steps.get-version.outputs.PROJECT_VERSION}}.jar \ | ||
-DgroupId=com.chutneytesting \ | ||
-DartifactId=local-api-unsecure \ | ||
-Dversion=${{steps.get-version.outputs.PROJECT_VERSION}} \ | ||
-Dpackaging=jar | ||
- name: Resolve dsl gradle goal from inputs | ||
id: dsl-goals | ||
run: | | ||
skipTestArg="" | ||
gradleGoals="clean build" | ||
if ${{ inputs.skipTests }}; then | ||
skipTestArg="-x test" | ||
fi | ||
if ${{ inputs.release }}; then | ||
gradleGoals="publish -Pserver-id=${{inputs.server-id}}" | ||
skipTestArg="-x test" | ||
fi | ||
echo "DSL_GOALS=$gradleGoals $skipTestArg" >> $GITHUB_OUTPUT | ||
- name: Build DSL | ||
uses: ./.github/actions/build-dsl | ||
env: | ||
MAVEN_USERNAME: ${{secrets.maven-username}} | ||
MAVEN_PASSWORD: ${{secrets.maven-password}} | ||
CHUTNEY_GPG_KEY_ID: ${{ secrets.gpg-key-id }} | ||
CHUTNEY_GPG_KEY: ${{ secrets.gpg-private-key }} | ||
CHUTNEY_GPG_PASSPHRASE: ${{ secrets.gpg-passphrase }} | ||
with: | ||
goals: ${{steps.dsl-goals.outputs.DSL_GOALS}} | ||
cache-artifacts: ${{ inputs.cache-artifacts }} | ||
|
||
- name: Resolve plugin gradle goal from inputs | ||
if: ${{! inputs.release}} | ||
id: plugin-goals | ||
run: | | ||
skipTestArg="" | ||
if ${{ inputs.skipTests }}; then | ||
skipTestArg="-x test" | ||
fi | ||
echo "PLUGIN_GOALS=clean buildPlugin $skipTestArg" >> $GITHUB_OUTPUT | ||
- name: Build Plugin | ||
if: ${{! inputs.release}} | ||
uses: ./.github/actions/build-plugin | ||
with: | ||
goals: ${{steps.plugin-goals.outputs.PLUGIN_GOALS}} | ||
cache-artifacts: ${{ inputs.cache-artifacts }} | ||
|
||
outputs: | ||
PROJECT_VERSION: ${{ steps.get-version.outputs.PROJECT_VERSION }} |
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,13 @@ | ||
name: "Build all" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build-all-template.yml | ||
with: | ||
skipTests: ${{ startsWith(github.head_ref, 'release/') }} |
Oops, something went wrong.