Skip to content

Commit

Permalink
Merge pull request #11 from gabriel-logan/main
Browse files Browse the repository at this point in the history
chore: Update project to deploy using github action
  • Loading branch information
gabriel-logan authored Jul 9, 2024
2 parents 2517870 + 199c3f2 commit 64fc30f
Show file tree
Hide file tree
Showing 16 changed files with 181 additions and 187 deletions.
47 changes: 43 additions & 4 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,65 @@ on:

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
server-id: github
settings-path: ${{ github.workspace }}

- name: Create settings.xml
run: |
echo '<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/multiform-validator/java</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>gabriel-logan</username>
<password>${{secrets.MULTIFORM_VALIDATOR_MVN_TOKEN_GITHUB_PACKAGES}}</password>
</server>
</servers>
</settings>' > settings.xml
- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s settings.xml
env:
GITHUB_TOKEN: ${{ secrets.MULTIFORM_VALIDATOR_MVN_TOKEN_GITHUB_PACKAGES }}
GITHUB_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github</groupId>
<artifactId>multiform-validator</artifactId>
<version>0.0.2</version>
<version>0.0.1</version>

<name>Multiform Validator</name>
<description>
Expand Down
36 changes: 0 additions & 36 deletions settings.xml

This file was deleted.

3 changes: 3 additions & 0 deletions target/maven-archiver/pom.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
artifactId=multiform-validator
groupId=io.github
version=0.0.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
D:\programas\validadores\multiform-validator\FORKS\java\src\main\java\io\github\multiform_validator\CnpjValidator.java
D:\programas\validadores\multiform-validator\FORKS\java\src\main\java\io\github\multiform_validator\CreditCardValidator.java
D:\programas\validadores\multiform-validator\FORKS\java\src\main\java\io\github\multiform_validator\Utils.java
D:\programas\validadores\multiform-validator\FORKS\java\src\main\java\io\github\multiform_validator\Validator.java
D:\programas\validadores\multiform-validator\FORKS\java\src\main\java\io\github\multiform_validator\CpfValidator.java
D:\programas\validadores\multiform-validator\FORKS\java\src\main\java\io\github\multiform_validator\CreditCardValidator.java
D:\programas\validadores\multiform-validator\FORKS\java\src\main\java\io\github\multiform_validator\EmailValidator.java
D:\programas\validadores\multiform-validator\FORKS\java\src\main\java\io\github\multiform_validator\Main.java
D:\programas\validadores\multiform-validator\FORKS\java\src\main\java\io\github\multiform_validator\Utils.java
D:\programas\validadores\multiform-validator\FORKS\java\src\main\java\io\github\multiform_validator\Validator.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
D:\programas\validadores\multiform-validator\FORKS\java\src\test\java\CnpjValidatorTest.java
D:\programas\validadores\multiform-validator\FORKS\java\src\test\java\CpfValidatorTest.java
D:\programas\validadores\multiform-validator\FORKS\java\src\test\java\CreditCardValidatorTest.java
D:\programas\validadores\multiform-validator\FORKS\java\src\test\java\EmailValidatorTest.java
D:\programas\validadores\multiform-validator\FORKS\java\src\test\java\UtilsTest.java
D:\programas\validadores\multiform-validator\FORKS\java\src\test\java\CnpjValidatorTest.java
D:\programas\validadores\multiform-validator\FORKS\java\src\test\java\ValidatorTest.java
D:\programas\validadores\multiform-validator\FORKS\java\src\test\java\EmailValidatorTest.java
D:\programas\validadores\multiform-validator\FORKS\java\src\test\java\CreditCardValidatorTest.java
2 changes: 1 addition & 1 deletion target/surefire-reports/CnpjValidatorTest.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-------------------------------------------------------------------------------
Test set: CnpjValidatorTest
-------------------------------------------------------------------------------
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.04 s - in CnpjValidatorTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.044 s - in CnpjValidatorTest
2 changes: 1 addition & 1 deletion target/surefire-reports/CreditCardValidatorTest.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-------------------------------------------------------------------------------
Test set: CreditCardValidatorTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in CreditCardValidatorTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in CreditCardValidatorTest
46 changes: 22 additions & 24 deletions target/surefire-reports/TEST-CnpjValidatorTest.xml
Original file line number Diff line number Diff line change
@@ -1,68 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="CnpjValidatorTest" time="0.04" tests="6" errors="0" skipped="0" failures="0">
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="CnpjValidatorTest" time="0.044" tests="6" errors="0" skipped="0" failures="0">
<properties>
<property name="java.specification.version" value="22"/>
<property name="java.specification.version" value="17"/>
<property name="sun.cpu.isalist" value="amd64"/>
<property name="sun.jnu.encoding" value="Cp1252"/>
<property name="java.class.path" value="D:\programas\validadores\multiform-validator\FORKS\java\target\test-classes;D:\programas\validadores\multiform-validator\FORKS\java\target\classes;C:\Users\Logan\.m2\repository\org\jetbrains\annotations\24.1.0\annotations-24.1.0.jar;C:\Users\Logan\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.7.0\junit-jupiter-api-5.7.0.jar;C:\Users\Logan\.m2\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;C:\Users\Logan\.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\Logan\.m2\repository\org\junit\platform\junit-platform-commons\1.7.0\junit-platform-commons-1.7.0.jar;C:\Users\Logan\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.7.0\junit-jupiter-engine-5.7.0.jar;C:\Users\Logan\.m2\repository\org\junit\platform\junit-platform-engine\1.7.0\junit-platform-engine-1.7.0.jar;"/>
<property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="java.vm.vendor" value="Microsoft"/>
<property name="sun.arch.data.model" value="64"/>
<property name="user.variant" value=""/>
<property name="java.vendor.url" value="https://java.oracle.com/"/>
<property name="java.vendor.url" value="https://www.microsoft.com"/>
<property name="user.timezone" value="America/Sao_Paulo"/>
<property name="os.name" value="Windows 10"/>
<property name="java.vm.specification.version" value="22"/>
<property name="java.vm.specification.version" value="17"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="BR"/>
<property name="sun.boot.library.path" value="C:\Users\Logan\.jdks\openjdk-22\bin"/>
<property name="sun.java.command" value="C:\Users\Logan\AppData\Local\Temp\surefire14797738243430755351\surefirebooter6291945349090797851.jar C:\Users\Logan\AppData\Local\Temp\surefire14797738243430755351 2024-07-09T04-15-40_326-jvmRun1 surefire9510026437266008440tmp surefire_013539498034008287629tmp"/>
<property name="sun.boot.library.path" value="C:\Program Files\Microsoft\jdk-17.0.10.7-hotspot\bin"/>
<property name="sun.java.command" value="C:\Users\Logan\AppData\Local\Temp\surefire7645533957230140402\surefirebooter8246774691025196484.jar C:\Users\Logan\AppData\Local\Temp\surefire7645533957230140402 2024-07-09T14-54-12_624-jvmRun1 surefire4929957768165396563tmp surefire_01607370843801881845tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="D:\programas\validadores\multiform-validator\FORKS\java\target\test-classes;D:\programas\validadores\multiform-validator\FORKS\java\target\classes;C:\Users\Logan\.m2\repository\org\jetbrains\annotations\24.1.0\annotations-24.1.0.jar;C:\Users\Logan\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.7.0\junit-jupiter-api-5.7.0.jar;C:\Users\Logan\.m2\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;C:\Users\Logan\.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\Logan\.m2\repository\org\junit\platform\junit-platform-commons\1.7.0\junit-platform-commons-1.7.0.jar;C:\Users\Logan\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.7.0\junit-jupiter-engine-5.7.0.jar;C:\Users\Logan\.m2\repository\org\junit\platform\junit-platform-engine\1.7.0\junit-platform-engine-1.7.0.jar;"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="C:\Users\Logan"/>
<property name="user.language" value="pt"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2024-03-19"/>
<property name="java.home" value="C:\Users\Logan\.jdks\openjdk-22"/>
<property name="java.version.date" value="2024-01-16"/>
<property name="java.home" value="C:\Program Files\Microsoft\jdk-17.0.10.7-hotspot"/>
<property name="file.separator" value="\"/>
<property name="basedir" value="D:\programas\validadores\multiform-validator\FORKS\java"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="surefire.real.class.path" value="C:\Users\Logan\AppData\Local\Temp\surefire14797738243430755351\surefirebooter6291945349090797851.jar"/>
<property name="surefire.real.class.path" value="C:\Users\Logan\AppData\Local\Temp\surefire7645533957230140402\surefirebooter8246774691025196484.jar"/>
<property name="user.script" value=""/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="22+36-2370"/>
<property name="java.runtime.version" value="17.0.10+7-LTS"/>
<property name="user.name" value="Logan"/>
<property name="stdout.encoding" value="Cp1252"/>
<property name="path.separator" value=";"/>
<property name="os.version" value="10.0"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="file.encoding" value="Cp1252"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Microsoft-8902769"/>
<property name="localRepository" value="C:\Users\Logan\.m2\repository"/>
<property name="java.vendor.url.bug" value="https://bugreport.java.com/bugreport/"/>
<property name="java.vendor.url.bug" value="https://github.com/microsoft/openjdk/issues"/>
<property name="java.io.tmpdir" value="C:\Users\Logan\AppData\Local\Temp\"/>
<property name="idea.version" value="2023.3.6"/>
<property name="java.version" value="22"/>
<property name="java.version" value="17.0.10"/>
<property name="user.dir" value="D:\programas\validadores\multiform-validator\FORKS\java"/>
<property name="os.arch" value="amd64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="sun.os.patch.level" value=""/>
<property name="native.encoding" value="Cp1252"/>
<property name="java.library.path" value="C:\Users\Logan\.jdks\openjdk-22\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Microsoft\jdk-17.0.10.7-hotspot\bin;C:\Program Files\Microsoft\jdk-11.0.18.10-hotspot\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Python311;C:\Program Files\Git\cmd;C:\MinGW\bin;C:\Program Files\nodejs\;C:\Program Files\Git LFS;C:\Python311\Scripts\;C:\Python311\;C:\Users\Logan\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\Logan\AppData\Local\Programs\Python\Python311\;C:\Users\Logan\AppData\Local\Microsoft\WindowsApps;C:\Users\Logan\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Logan\AppData\Local\Android\Sdk\emulator;C:\Users\Logan\AppData\Local\Android\Sdk\tools;C:\Users\Logan\AppData\Local\Android\Sdk\tools\bin;C:\Users\Logan\AppData\Local\Android\Sdk\platform-tools;C:\Program Files (x86)\Nmap;C:\Program Files\OpenSSL-Win64\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.3.6\bin;;C:\Users\Logan\AppData\Roaming\npm;C:\Users\Logan\AppData\Local\Android\Sdk\platform-tools;;C:\Users\Logan\.deno\bin;."/>
<property name="java.library.path" value="C:\Program Files\Microsoft\jdk-17.0.10.7-hotspot\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Microsoft\jdk-17.0.10.7-hotspot\bin;C:\Program Files\Microsoft\jdk-11.0.18.10-hotspot\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Python311;C:\Program Files\Git\cmd;C:\MinGW\bin;C:\Program Files\nodejs\;C:\Program Files\Git LFS;C:\Program Files\apache-maven-3.9.8\bin;C:\Python311\Scripts\;C:\Python311\;C:\Users\Logan\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\Logan\AppData\Local\Programs\Python\Python311\;C:\Users\Logan\AppData\Local\Microsoft\WindowsApps;C:\Users\Logan\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Logan\AppData\Local\Android\Sdk\emulator;C:\Users\Logan\AppData\Local\Android\Sdk\tools;C:\Users\Logan\AppData\Local\Android\Sdk\tools\bin;C:\Users\Logan\AppData\Local\Android\Sdk\platform-tools;C:\Program Files (x86)\Nmap;C:\Program Files\OpenSSL-Win64\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.3.6\bin;;C:\Users\Logan\AppData\Roaming\npm;C:\Users\Logan\AppData\Local\Android\Sdk\platform-tools;;C:\Users\Logan\.deno\bin;."/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="stderr.encoding" value="Cp1252"/>
<property name="java.vendor" value="Oracle Corporation"/>
<property name="java.vm.version" value="22+36-2370"/>
<property name="java.vendor" value="Microsoft"/>
<property name="java.vm.version" value="17.0.10+7-LTS"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="java.class.version" value="66.0"/>
<property name="java.class.version" value="61.0"/>
</properties>
<testcase name="testInvalidCnpj" classname="CnpjValidatorTest" time="0.027"/>
<testcase name="testInvalidCnpj" classname="CnpjValidatorTest" time="0.029"/>
<testcase name="testNullCnpj" classname="CnpjValidatorTest" time="0.001"/>
<testcase name="testEmptyCnpj" classname="CnpjValidatorTest" time="0"/>
<testcase name="testEmptyCnpj" classname="CnpjValidatorTest" time="0.001"/>
<testcase name="testValidCnpj" classname="CnpjValidatorTest" time="0.001"/>
<testcase name="testInvalidFormatCnpj" classname="CnpjValidatorTest" time="0.001"/>
<testcase name="testInvalidLengthCnpj" classname="CnpjValidatorTest" time="0.001"/>
<testcase name="testInvalidLengthCnpj" classname="CnpjValidatorTest" time="0"/>
</testsuite>
Loading

0 comments on commit 64fc30f

Please sign in to comment.