You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2022/10/02 14:53:46 UTC

[httpcomponents-client] 01/04: Add GitHub Actions build and remove Travis-CI

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch 5.1.x
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git

commit fd17d2ea64dcf8cefb8e8d43d4e689d3c5db9931
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Sep 26 09:30:04 2022 -0400

    Add GitHub Actions build and remove Travis-CI
---
 .github/workflows/maven.yml | 61 +++++++++++++++++++++++++++++++++++++++++++++
 .travis.yml                 | 40 -----------------------------
 README.md                   |  4 +--
 pom.xml                     |  1 +
 4 files changed, 64 insertions(+), 42 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 000000000..c25f9404c
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Java CI
+
+on: [push, pull_request]
+
+permissions:
+  contents: read
+
+jobs:
+  build:
+
+    runs-on: ${{ matrix.os }}
+    continue-on-error: ${{ matrix.experimental }}
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macos-latest]
+        # All LTS versions plus the current version. Java 17 cannot be tested with due to
+        # EasyMock incompatibility (removed in 5.2)
+        java: [ 8, 11 ]
+        experimental: [false]
+#        include:
+#          - java: 20-ea
+#            os: ubuntu-latest
+#            experimental: true        
+#          - java: 20-ea
+#            os: windows-latest
+#            experimental: true        
+#          - java: 20-ea
+#            os: macos-latest
+#            experimental: true        
+      fail-fast: false
+        
+    steps:
+    - uses: actions/checkout@v3
+    - uses: actions/cache@v3
+      with:
+        path: ~/.m2/repository
+        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+        restore-keys: |
+          ${{ runner.os }}-maven-
+    - name: Set up JDK ${{ matrix.java }}
+      uses: actions/setup-java@v3
+      with:
+        distribution: 'temurin'
+        java-version: ${{ matrix.java }}
+    - name: Build with Maven
+      run: mvn -V --file pom.xml --no-transfer-progress -DtrimStackTrace=false -P-use-toolchains
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 79392d417..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-language: java
-dist: trusty
-sudo: false
-
-arch:
-  - amd64
-  - arm64
-
-addons:
-  apt:
-    packages:
-      - maven
-      
-jdk:
-  - oraclejdk8
-  - openjdk12
-  - oraclejdk12
-  - openjdk-ea
-
-matrix:
-  allow_failures:
-    - jdk: openjdk-ea
-
-after_success:
-  - mvn clean cobertura:cobertura coveralls:report
diff --git a/README.md b/README.md
index 8cf1360e9..042b94aae 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ Apache HttpComponents Client
 
 Welcome to the HttpClient component of the Apache HttpComponents project.
 
-[![Build Status](https://travis-ci.com/apache/httpcomponents-client.svg?branch=master)](https://travis-ci.com/apache/httpcomponents-client)
+[![GitHub Actions Status](https://github.com/apache/httpcomponents-client/workflows/Java%20CI/badge.svg)](https://github.com/apache/httpcomponents-client/actions)
 [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.httpcomponents.client5/httpclient5/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.httpcomponents.client5/httpclient5)
 [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
 
@@ -37,7 +37,7 @@ For building from source instructions please refer to [BUILDING.txt](./BUILDING.
 Dependencies
 ------------
 
-HttpClient main module requires Java 7 compatible runtime and
+HttpClient main module requires Java 8 compatible runtime and
 depends on the following external libraries:
 
 * [Apache HttpComponents HttpCore](https://github.com/apache/httpcomponents-core)
diff --git a/pom.xml b/pom.xml
index 983cf2aa3..a92d5e49c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -207,6 +207,7 @@
   </modules>
 
   <build>
+    <defaultGoal>clean verify</defaultGoal>
     <plugins>
       <plugin>
         <artifactId>maven-jar-plugin</artifactId>