Skip to content
This repository has been archived by the owner on Dec 7, 2024. It is now read-only.

Commit

Permalink
feat(CI): creating CI.yml to automate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexZ7000 committed Oct 9, 2024
1 parent 3bb6b43 commit e286073
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Set environment variables
run: echo "APPLICATION_NAME=${{ secrets.APPLICATION_NAME }}" >> $GITHUB_ENV
- name: Build and test with Maven
run: mvn -B verify --file pom.xml
env:
APPLICATION_NAME: ${{ secrets.APPLICATION_NAME }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
JPA_DDL: ${{ secrets.JPA_DDL }}
JPA_SHOW_SQL: ${{ secrets.JPA_SHOW_SQL }}
JPA_OPEN_IN_VIEW: ${{ secrets.JPA_OPEN_IN_VIEW }}
- name: Upload coverage results
if: success() && steps.test.outputs.coverage_report != ''
uses: codecov/codecov-action@v3
with:
file: path/to/coverage-report.xml

2 changes: 0 additions & 2 deletions src/main/java/com/example/comerce/core/entities/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;

import java.util.UUID;

@Entity

@Getter
@Setter
public class User {
Expand Down

0 comments on commit e286073

Please sign in to comment.