This is an automated email from the ASF dual-hosted git repository. hectorespert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push: new 272d199 Continuous build in Windows new fb64095 Merge pull request #2158 from hectorespert/github_windows_action 272d199 is described below commit 272d199b725636916908951cee5c82a358df5452 Author: Hector Espert <hectorespertpa...@gmail.com> AuthorDate: Tue May 26 21:07:19 2020 +0200 Continuous build in Windows --- .github/workflows/main.yml | 46 +++++++++++++++++++++ .../utils/hname/win/HostnameUtilsWinTest.java | 48 ++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1ae04eb --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,46 @@ +# 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: Apache Netbeans Continuous Integration + +on: + push: + pull_request: + +jobs: + windows: + name: Windows build + runs-on: windows-2019 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Caching dependencies + uses: actions/cache@v2 + with: + path: ~/.hgexternalcache + key: ${{ runner.os }}-${{ hashFiles('**/external/binaries-list') }} + restore-keys: ${{ runner.os }}- + + - name: Clean + run: ant clean + + - name: Build + run: ant build + + - name: Test + run: ant -f platform/core.network test diff --git a/platform/core.network/test/unit/src/org/netbeans/core/network/utils/hname/win/HostnameUtilsWinTest.java b/platform/core.network/test/unit/src/org/netbeans/core/network/utils/hname/win/HostnameUtilsWinTest.java new file mode 100644 index 0000000..56d11a2 --- /dev/null +++ b/platform/core.network/test/unit/src/org/netbeans/core/network/utils/hname/win/HostnameUtilsWinTest.java @@ -0,0 +1,48 @@ +/* + * 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. + */ +package org.netbeans.core.network.utils.hname.win; + +import com.sun.jna.Platform; +import org.netbeans.junit.NbTestCase; + +/** + * + * @author Hector Espert + */ +public class HostnameUtilsWinTest extends NbTestCase { + + public HostnameUtilsWinTest(String name) { + super(name); + } + + @Override + public boolean canRun() { + return super.canRun() && Platform.isWindows(); + } + + public void testGetComputerName() throws Exception { + assertNotNull(HostnameUtilsWin.getComputerName()); + } + + public void testGetHostName() throws Exception { + assertNotNull(HostnameUtilsWin.getHostName(true)); + assertNotNull(HostnameUtilsWin.getHostName(false)); + } + +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists