CICD
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 30s

This commit is contained in:
2024-09-24 21:28:31 -04:00
parent 0ea536fcfa
commit 508768016e
10 changed files with 91 additions and 20 deletions
+19
View File
@@ -0,0 +1,19 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
+40 -5
View File
@@ -13,6 +13,46 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<profiles>
<profile>
<id>Regression</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>Smoke</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testngGroups.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
<dependencies> <dependencies>
<dependency> <dependency>
@@ -28,11 +68,6 @@
<artifactId>selenium-java</artifactId> <artifactId>selenium-java</artifactId>
<version>4.25.0</version> <version>4.25.0</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.0</version>
</dependency>
<dependency> <dependency>
<groupId>org.testng</groupId> <groupId>org.testng</groupId>
<artifactId>testng</artifactId> <artifactId>testng</artifactId>
+2
View File
@@ -0,0 +1,2 @@
browser="firefox"
url="https://zenful.cloud/"
@@ -0,0 +1,14 @@
package zacksolutions;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
public class GlobalValues {
public static void main(String[] args) throws IOException {
Properties pro = new Properties();
FileInputStream fis = new FileInputStream("/home/ilyes/SeleniumPractice/testNG_FrameWork/src/data.properties");
pro.load(fis);
System.out.println(pro.getProperty("url"));
}
}
@@ -4,7 +4,7 @@ import org.testng.annotations.BeforeTest;
import org.testng.annotations.Parameters; import org.testng.annotations.Parameters;
import org.testng.annotations.Test; import org.testng.annotations.Test;
public class TestHomePage { public class HomePageTest {
@Parameters({ "URL" }) @Parameters({ "URL" })
@Test(groups = { "Smoke" }) @Test(groups = { "Smoke" })
@@ -2,7 +2,7 @@ package zacksolutions;
import org.testng.annotations.Test; import org.testng.annotations.Test;
public class TestLoginPage { public class LoginPageTest {
@Test @Test
public static void testCaseEleven() { public static void testCaseEleven() {
System.out.println("Debug the eleventh case"); System.out.println("Debug the eleventh case");
@@ -3,7 +3,7 @@ package zacksolutions;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;
public class TestNGClass { public class NGClassTest {
@AfterTest @AfterTest
public static void testCaseOne() { public static void testCaseOne() {
System.out.println("Debug the firtst case ### AFTER TEST ###"); System.out.println("Debug the firtst case ### AFTER TEST ###");
@@ -1,9 +1,8 @@
package zacksolutions; package zacksolutions;
import org.testng.Assert;
import org.testng.annotations.Test; import org.testng.annotations.Test;
public class TestNGDiffClass { public class NGDiffClassTest {
@Test @Test
public void testCaseSix() { public void testCaseSix() {
System.out.println("Debug the sixteenth case"); System.out.println("Debug the sixteenth case");
@@ -27,6 +26,5 @@ public class TestNGDiffClass {
@Test(groups = { "Smoke" }) @Test(groups = { "Smoke" })
public static void testCaseTen() { public static void testCaseTen() {
System.out.println("Debug the tenth case"); System.out.println("Debug the tenth case");
Assert.assertTrue(false);
} }
} }
+7 -4
View File
@@ -3,17 +3,20 @@
<suite name="All Test Suite"> <suite name="All Test Suite">
<test verbose="2" preserve-order="true" name="/home/ilyes/LearnSelenium/testNG_FrameWork"> <test verbose="2" preserve-order="true" name="/home/ilyes/LearnSelenium/testNG_FrameWork">
<classes> <classes>
<class name="zacksolutions.TestNGDiffClass"> <class name="zacksolutions.NGDiffClassTest">
</class> </class>
<class name="zacksolutions.TestHomePage"> <class name="zacksolutions.HomePageTest">
<methods>
<exclude name="testCaseSixteen"></exclude>
</methods>
</class> </class>
</classes> </classes>
</test> </test>
<test name="DiffTest"> <test name="DiffTest">
<classes> <classes>
<class name="zacksolutions.TestNGClass"> <class name="zacksolutions.NGClassTest">
</class> </class>
<class name="zacksolutions.TestLoginPage"> <class name="zacksolutions.LoginPageTest">
</class> </class>
</classes> </classes>
</test> </test>
+5 -5
View File
@@ -4,7 +4,7 @@
<listeners> <listeners>
<listener class-name="zacksolutions.Listeners"></listener> <listener class-name="zacksolutions.Listeners"></listener>
</listeners> </listeners>
<parameter name="URL" value="zacksolutions.dev"/> <parameter name="URL" value="https://gitea.zacksolutions.dev"/>
<test name="RegressionTest"> <test name="RegressionTest">
<groups> <groups>
<run> <run>
@@ -12,13 +12,13 @@
</run> </run>
</groups> </groups>
<classes> <classes>
<class name="zacksolutions.TestNGDiffClass"> <class name="zacksolutions.NGDiffClassTest">
</class> </class>
<class name="zacksolutions.TestHomePage"> <class name="zacksolutions.HomePageTest">
</class> </class>
<class name="zacksolutions.TestNGClass"> <class name="zacksolutions.NGClassTest">
</class> </class>
<class name="zacksolutions.TestLoginPage"> <class name="zacksolutions.LoginPageTest">
</class> </class>
</classes> </classes>
</test> </test>