Skip to content

Commit b15677c

Browse files
committed
Update specmatic deps to latest
- Update GitHub Workflow, README.md - Add Specmatic reposilite source - Add testContainer setup for contract tests
1 parent 3552381 commit b15677c

File tree

13 files changed

+109
-168
lines changed

13 files changed

+109
-168
lines changed

.github/workflows/gradle.yaml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1-
name: Java CI with Gradle
1+
name: Run tests
22

33
on:
44
push:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8+
89
jobs:
9-
build:
10+
test:
1011
strategy:
1112
matrix:
12-
os: [ubuntu-latest, macos-latest]
13-
java: [17]
13+
os: [ ubuntu-latest ]
1414
runs-on: ${{ matrix.os }}
1515
steps:
16-
- uses: actions/checkout@v4
17-
with: { fetch-depth: 0 }
18-
- name: Set up JDK ${{ matrix.java }}
19-
uses: actions/setup-java@v3
20-
with:
21-
distribution: 'oracle'
22-
java-version: ${{ matrix.java }}
16+
- uses: actions/checkout@v4
17+
with: { fetch-depth: 0 }
18+
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '17'
23+
distribution: 'temurin'
2324

24-
- name: Grant execute permission for gradlew on BFF repo
25-
run: chmod +x gradlew
25+
- name: Setup Gradle
26+
uses: gradle/actions/setup-gradle@v4
2627

27-
- name: Build BFF project with Gradle
28-
run: ./gradlew build
28+
- name: Build BFF project with Gradle
29+
run: ./gradlew build

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212
- Start Docker Desktop
1313
- Start the graphql service stub using
1414
```shell
15-
docker run -v "$PWD/specmatic.yml:/usr/src/app/specmatic.yml" -v "$PWD/src/test/resources/specmatic/graphql/examples:/usr/src/app/examples" -p 8080:8080 znsio/specmatic-graphql virtualize --port=8080 --examples=examples
15+
docker run -v "$PWD/specmatic.yml:/usr/src/app/specmatic.yml" -v "$PWD/src/test/resources/specmatic/graphql/examples:/usr/src/app/examples" -p 8080:8080 specmatic/specmatic-graphql virtualize --port=8080 --examples=examples
1616
```
1717
- Run the application - `./gradlew bootRun`
1818
- Run the tests -
1919
```shell
20-
docker run --network host -v "$PWD/specmatic.yml:/usr/src/app/specmatic.yml" -v "$PWD/build/reports/specmatic:/usr/src/app/build/reports/specmatic" znsio/specmatic test --port=8070 --host=host.docker.internal
20+
docker run --network host -v "$PWD/specmatic.yml:/usr/src/app/specmatic.yml" -v "$PWD/build/reports/specmatic:/usr/src/app/build/reports/specmatic" specmatic/specmatic test --port=8070 --host=host.docker.internal
2121
```
2222

2323
Look at the `ContractTest` class to see how the GraphQL dependency has been stubbed out.
2424

2525
## Start the application
2626

27-
1. Checkout the Order API project from [here](https://github.com/znsio/specmatic-order-api-java), and start it up using the instructions in it's README.
28-
2. Checkout the BFF project from [here](https://github.com/znsio/specmatic-order-bff-graphql-java), and start it up using the instructions in it's README.
27+
1. Checkout the Order API project from [here](https://github.com/specmatic/specmatic-order-api-java), and start it up using the instructions in it's README.
28+
2. Checkout the BFF project from [here](https://github.com/specmatic/specmatic-order-bff-graphql-java), and start it up using the instructions in it's README.
2929
3. Execute this command:
3030

3131
```shell

build.gradle

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
plugins {
2+
id 'java'
3+
id 'org.jetbrains.kotlin.jvm' version '2.1.0'
24
id 'org.springframework.boot' version '3.1.0'
35
id 'io.spring.dependency-management' version '1.1.0'
4-
id 'java'
56
}
67

78
group = 'com.example'
89
version = '0.0.1-SNAPSHOT'
910

1011
repositories {
11-
maven {
12-
url uri('lib')
13-
}
1412
mavenLocal()
1513
mavenCentral()
14+
maven {
15+
url "https://repo.specmatic.io/releases"
16+
}
1617
}
1718

1819
dependencies {
@@ -22,12 +23,12 @@ dependencies {
2223
implementation 'org.springframework.boot:spring-boot-starter-graphql:3.4.4'
2324
implementation 'org.springframework.boot:spring-boot-starter-webflux:3.4.4'
2425

25-
testImplementation "io.specmatic:junit5-support:${specmaticVersion}"
2626
testImplementation 'org.springframework.boot:spring-boot-starter-test'
2727
testImplementation 'org.springframework.graphql:spring-graphql-test'
28-
testImplementation("io.specmatic.graphql:specmatic-graphql-min:${specmaticGraphqlVersion}") {
29-
exclude group: 'io.specmatic', module: 'specmatic-executable'
30-
}
28+
29+
testImplementation "io.specmatic:junit5-support:${specmaticVersion}"
30+
testImplementation "io.specmatic.graphql:specmatic-graphql:${specmaticGraphqlVersion}"
31+
testImplementation 'org.testcontainers:junit-jupiter:1.21.3'
3132
}
3233

3334
test {

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
specmaticGraphqlVersion=1.0.16
2-
specmaticVersion=2.7.8
1+
specmaticVersion=2.27.1
2+
specmaticGraphqlVersion=1.2.0

lib/io/specmatic/graphql/specmatic-graphql-min/1.0.16/_remote.repositories

Lines changed: 0 additions & 4 deletions
This file was deleted.
Binary file not shown.

lib/io/specmatic/graphql/specmatic-graphql-min/1.0.16/specmatic-graphql-min-1.0.16.jar.lastUpdated

Lines changed: 0 additions & 5 deletions
This file was deleted.

lib/io/specmatic/graphql/specmatic-graphql-min/1.0.16/specmatic-graphql-min-1.0.16.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/io/specmatic/graphql/specmatic-graphql-min/1.0.16/specmatic-graphql-min-1.0.16.pom

Lines changed: 0 additions & 120 deletions
This file was deleted.

lib/io/specmatic/graphql/specmatic-graphql-min/1.0.16/specmatic-graphql-min-1.0.16.pom.lastUpdated

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)