Skip to content

Commit

Permalink
🐛 Fixing bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jossmoff committed May 21, 2024
1 parent 0ad2341 commit 5490174
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 29 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 🕵️

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Build & Test
run: ./gradlew clean build

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 📚 Deploy Documentation

on:
push:
branches:
- main
paths:
- 'docs/**'


jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: 🔄 Checkout
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: 📥 Install modules
run: npm ci --prefix docs
- name: 🏗️ Build application
run: npm run build --prefix docs
- name: 🚀 Deploy to S3
run: aws s3 sync ./docs/dist/ s3://${{ secrets.BUCKET_ID }}
- name: ☁️ Create CloudFront invalidation
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/*"

14 changes: 2 additions & 12 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,10 @@ jobs:
distribution: temurin
java-version: 11

- name: Set up Test Environment
run: |
pip install localstack awscli-local
docker pull localstack/localstack
- name: Test
run: ./gradlew test
env:
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}

- name: Publish
run: ./gradlew build publish --no-parallel
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Prelease
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
20 changes: 20 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release Drafter

on:
push:
branches:
- main

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 14 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
plugins {
id 'scala'
id 'java'
id 'jacoco'
id 'com.diffplug.spotless' version '6.20.0'
id 'maven-publish'
id 'signing'
id "com.avast.gradle.docker-compose" version "0.17.4"
id 'com.palantir.git-version' version '3.0.0'
id 'io.github.gradle-nexus.publish-plugin' version "1.3.0"
id 'com.diffplug.spotless' version '6.23.2'
id "net.ltgt.errorprone" version "3.1.0"
}

group = 'dev.joss'
Expand All @@ -21,7 +25,7 @@ repositories {
ext {
junitVersion = "5.10.0"
scalaVersion = "2.13.11"
gatlingVersion = "3.9.5"
gatlingVersion = "3.11.0"
awsSdkVersion = "2.20.130"
}

Expand Down Expand Up @@ -121,14 +125,15 @@ publishing {
}
}
}
}

nexusPublishing {
repositories {
maven {
name = "OSSRH"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = project.findProperty("sonatypeUsername")
password = project.findProperty("sonatypePassword")
}
sonatype {
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
username = project.findProperty("sonatypeUsername")
password = project.findProperty("sonatypePassword")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "scala"
id 'io.gatling.gradle' version '3.9.5.5'
id "com.diffplug.spotless" version "6.20.0"
id 'com.diffplug.spotless' version '6.23.2'
}

repositories {
Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/dev/joss/gatling/sfn/SfnDsl.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.joss.gatling.sfn

import dev.joss.gatling.sfn.action.StartSyncExecutionActionBuilder
import dev.joss.gatling.sfn.protocol.{
SfnProtocol,
SfnProtocolBuilder,
Expand Down Expand Up @@ -45,7 +46,7 @@ trait SfnDsl {
): ActionBuilder = builder.build

implicit def sfnDslBuilder2ActionBuilder(
builder: StartSyncExecutionActionBuilder
builder: StartSyncExecutionActionBuilder
): ActionBuilder = builder.build

implicit def sfnDslBuilder2ActionBuilder(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package uk.co.capitalone.services.decision.processor.utils
package dev.joss.gatling.sfn.action

import dev.joss.gatling.sfn.action.SfnActionBase
import dev.joss.gatling.sfn.request.attributes.SfnExecuteAttributes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package uk.co.capitalone.services.decision.processor.utils
package dev.joss.gatling.sfn.action

import dev.joss.gatling.sfn.action.SfnActionBuilderBase
import dev.joss.gatling.sfn.request.attributes.SfnExecuteAttributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ object StartSyncExecutionDslBuilder {
}

final class Payload(
requestName: Expression[String],
executionArn: Expression[String]
requestName: Expression[String],
executionArn: Expression[String]
) {
def payload(payload: Expression[String]): StartSyncExecutionDslBuilder =
StartSyncExecutionDslBuilder(
Expand All @@ -49,8 +49,8 @@ object StartSyncExecutionDslBuilder {
}

final case class StartSyncExecutionDslBuilder(
attributes: SfnExecuteAttributes,
factory: SfnExecuteAttributes => StartSyncExecutionActionBuilder
attributes: SfnExecuteAttributes,
factory: SfnExecuteAttributes => StartSyncExecutionActionBuilder
) {
def build: ActionBuilder = factory(attributes)
}
Expand Down

0 comments on commit 5490174

Please sign in to comment.