diff --git a/.github/workflows/build-snapshot-jar.yml b/.github/workflows/build-snapshot-jar.yml index b70bfc2..80d67c8 100644 --- a/.github/workflows/build-snapshot-jar.yml +++ b/.github/workflows/build-snapshot-jar.yml @@ -22,10 +22,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 18 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: '18' + java-version: '11' distribution: 'temurin' # cache: maven - name: Build with Maven diff --git a/.github/workflows/test-compile.yml b/.github/workflows/test-compile.yml index c320d31..fe902d9 100644 --- a/.github/workflows/test-compile.yml +++ b/.github/workflows/test-compile.yml @@ -15,27 +15,33 @@ on: pull_request: workflow_dispatch: +env: + MAVEN_ARGS: -V -B --no-transfer-progress -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + jobs: build: + strategy: + fail-fast: false + matrix: + java: [ 11, 17, 21 ] + name: 'Linux JDK ${{ matrix.java }}' runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v3 - - name: Set up JDK 18 - uses: actions/setup-java@v3 - with: - java-version: '18' - distribution: 'temurin' - - name: Build and test with Maven - env: - POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }} - run: | - mkdir ./test-output - mvn test - - + - name: 'Checkout' + uses: actions/checkout@v3 + - name: 'Set up JDK ${{ matrix.java }}' + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + cache: 'maven' + - name: Build and test with Maven + env: + POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }} + run: | + mkdir ./test-output + mvn ${MAVEN_ARGS} test # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - - name: Update dependency graph - uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..58d1ff7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +target/ +.idea \ No newline at end of file diff --git a/pom.xml b/pom.xml index dbe3a97..da545fc 100644 --- a/pom.xml +++ b/pom.xml @@ -20,8 +20,6 @@ UTF-8 - 18 - 18 @@ -131,21 +129,14 @@ maven-resources-plugin 3.3.1 - org.apache.maven.plugins maven-compiler-plugin 3.11.0 - - 18 - 18 - + + 11 + 11 + maven-surefire-plugin diff --git a/src/main/java/com/postman/collection/RequestAuth.java b/src/main/java/com/postman/collection/RequestAuth.java index a168d1a..afc3149 100644 --- a/src/main/java/com/postman/collection/RequestAuth.java +++ b/src/main/java/com/postman/collection/RequestAuth.java @@ -129,7 +129,10 @@ public String getKey() { public enumAuthType getAuthType() { switch (type) { - case "apikey", "bearer": { + case "apikey": { + return enumAuthType.APIKEY; + } + case "bearer": { return enumAuthType.APIKEY; } case "digest": {