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

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/tsfile.git


The following commit(s) were added to refs/heads/develop by this push:
     new 1850f8d8 chore: Setup github actions
1850f8d8 is described below

commit 1850f8d86a7ded92ceef53a95fd9d6f5880384c4
Author: Christofer Dutz <[email protected]>
AuthorDate: Fri Jan 5 11:54:19 2024 +0100

    chore: Setup github actions
---
 .github/dependabot.yml          | 33 +++++++++++++++++++
 .github/workflows/greetings.yml | 14 ++++++++
 .github/workflows/unit-test.yml | 72 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 119 insertions(+)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..bc41d6cb
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,33 @@
+# ----------------------------------------------------------------------------
+# 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
+#
+#    https://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.
+# ----------------------------------------------------------------------------
+
+version: 2
+updates:
+- package-ecosystem: maven
+  directory: /
+  schedule:
+    interval: daily
+- package-ecosystem: github-actions
+  directory: /
+  schedule:
+    interval: daily
+- package-ecosystem: gomod
+  directory: plc4go
+  schedule:
+    interval: daily
diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml
new file mode 100644
index 00000000..72179bba
--- /dev/null
+++ b/.github/workflows/greetings.yml
@@ -0,0 +1,14 @@
+name: Greetings
+
+on: [issues, pull_request_target]
+
+jobs:
+  greeting:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/[email protected]
+      continue-on-error: true
+      with:
+        repo-token: ${{ secrets.GITHUB_TOKEN }}
+        issue-message: 'Hi, this is your first issue in the Apache TsFile 
project. Thanks for your report. Welcome to join the community!'
+        pr-message: 'Hi, this is your first pull request in the Apache TsFile 
project. Thanks for your contribution! TsFile will be better because of you.'
diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
new file mode 100644
index 00000000..45289dc1
--- /dev/null
+++ b/.github/workflows/unit-test.yml
@@ -0,0 +1,72 @@
+# This workflow will build a Java project with Maven
+# For more information see: 
https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
+
+name: Unit-Test
+
+on:
+  push:
+    branches:
+      - develop
+      - 'rel/*'
+  pull_request:
+    branches:
+      - develop
+      - 'rel/*'
+  # allow manually run the action:
+  workflow_dispatch:
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
+env:
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3
+  GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+
+jobs:
+  unit-test:
+    strategy:
+      fail-fast: false
+      max-parallel: 20
+      matrix:
+        java: [ 8, 11, 17, 21 ]
+        os: [ ubuntu-latest, windows-latest, windows-latest ]
+    runs-on: ${{ matrix.os }}
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+
+      - name: Set up JDK ${{ matrix.java }}
+        uses: actions/setup-java@v3
+        with:
+          distribution: corretto
+          java-version: ${{ matrix.java }}
+
+      # Setup caching of the artifacts in the .m2 directory so they don't have 
to
+      # all be downloaded again for every build.
+      - name: Cache Maven packages
+        uses: actions/cache@v3
+        with:
+          path: ~/.m2
+          key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+          restore-keys: ${{ runner.os }}-m2-
+
+      # On Windows systems the 'mvnw' script needs an additional ".cmd" 
appended.
+      - name: Calculate platform suffix
+        id: platform_suffix
+        uses: actions/[email protected]
+        env:
+          OS: ${{ matrix.os }}
+        with:
+          script: |
+            const { OS } = process.env
+            if (OS.includes("windows")) {
+              core.setOutput('platform_suffix', `.cmd`)
+            } else {
+              core.setOutput('platform_suffix', ``)
+            }
+
+      - name: Build and test with Maven
+        shell: bash
+        run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} clean 
verify

Reply via email to