Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature branch #8081

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf

18 changes: 9 additions & 9 deletions .github/Unleash_architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,9 @@ website/.yarn/*
!website/.yarn/sdks
!website/.yarn/versions


# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .gradle/7.1.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/7.1.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Tue Sep 03 00:20:19 CST 2024
gradle.version=7.1.1
Binary file added .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file added .gradle/checksums/checksums.lock
Binary file not shown.
Empty file modified .husky/pre-commit
100755 → 100644
Empty file.
Empty file modified .yarn/releases/yarn-4.3.1.cjs
100755 → 100644
Empty file.
54 changes: 54 additions & 0 deletions Guide.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
This is a test to indicate the proof of changes pulled and combined branch having proof of request for merging for UECS2363 Assignment 2.
This is a guide on managing a central repository.

Step 1: Fork and Clone the repository to your local machine.
1. Navigate to https://github.com/Unleash/unleash.
2. Click on the ‘Fork’ button to create a copy of the repository.
3. Copy the repository URL. First, since some files in the repository have paths that exceed the maximum path length limit in Windows, we must use “git config --system core.longpaths true” to allow for smooth copy. Then, open the command prompt and run the clone command. Replace ‘your-name’ with your own Github username.
$ git config --system core.longpaths true
$ git clone https://github.com/your-name/unleash.git

4. Navigate to the cloned directory.
$ cd unleash

Step 2. Create new branches
1. Create and switch to a new branch. We will be naming it the branch ‘test’.
$ git branch test
$ git add .
$ git checkout test


2. Check the current branch.
$ git branch

3. Check Current Remote and Change the URL for ‘origin’.
$ git remote -v
$ git remote set-url origin https://github.com/Unleash/unleash.git

Step 3. Make changes and commit.
1. Create txt file and put ‘info’ in it. ‘info’ is random sentences.
$ echo ‘info’ > test1.txt

2. Add files to the staging area and commit the changes.
$ git add .
$ git commit -m Added txt file

Step 4. Push changes to GitHub
1. Push the branch and verify the push in Github.
$ git push origin test

Step 5. Integrating changes from different users
1. Add the original repository as a remote.
$ git remote add upstream https://github.com/Unleash/unleash.git

2. Fetch the latest changes.
$ git fetch upstream

3. Merge the updates into your branch.
$ git merge upstream/test

4. Resolves conflict and commit the changes
$ git add resolved-file.js $ git commit -m Resolved conflicts

5. Push the merged branch.
$ git push origin test
147 changes: 147 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@


plugins {
id 'base'
}

task runDocker(type: Exec) {
description = 'Run Docker File'
commandLine 'docker', 'compose', 'up', '-d'
}

task runYarnInstall(type: Exec) {
// Path to the Yarn executable in the project
def yarnPath = './.yarn/releases/yarn-4.3.1.cjs'

// Command to run Yarn install
commandLine 'node', yarnPath, 'install'

// Set the working directory to where your package.json is located
workingDir '.'

// Print command output for debugging
standardOutput = System.out
errorOutput = System.err
}

task runYarnInstallFrontEnd(type: Exec) {
// Path to the Yarn executable in the project
def yarnPath = './.yarn/releases/yarn-4.3.1.cjs'

// Command to run Yarn install
commandLine 'node', yarnPath, 'install'

// Set the working directory to where your package.json is located
workingDir './frontend'

// Print command output for debugging
standardOutput = System.out
errorOutput = System.err
}

task runDatabase(type: Exec) {
description = 'Create a new database for the project'
commandLine 'docker', 'run',
'-e', 'POSTGRES_USER=unleash_user',
'-e', 'POSTGRES_PASSWORD=password',
'-e', 'POSTGRES_DB=unleash',
'--name', 'postgres',
'-p', '5432:5432',
'-d',
'postgres'
}


task executeDatabase(type: Exec){
description = 'Run the database'
commandLine 'docker', 'start', 'postgres'
}

task runBuild(type: Exec) {
// Path to the Yarn executable in the project
def yarnPath = './.yarn/releases/yarn-4.3.1.cjs'

// Command to run Yarn install
commandLine 'node', yarnPath, 'build'

// Set the working directory to where your package.json is located
workingDir '.'

// Print command output for debugging
standardOutput = System.out
errorOutput = System.err
}

task runUnleash(type: Exec) {
// Path to the Yarn executable in the project
def yarnPath = './.yarn/releases/yarn-4.3.1.cjs'

// Command to run Yarn install
commandLine 'node', yarnPath, 'dev'

// Set the working directory to where your package.json is located
workingDir '.'

// Print command output for debugging
standardOutput = System.out
errorOutput = System.err
}
=======
apply plugin: 'java'
apply plugin:'jacoco'
jacoco {
toolVersion = "0.8.7"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
group = 'lib'
version = 'V1'


repositories {
mavenCentral()
}


dependencies {
testImplementation 'junit:junit:4.13.2'
}


test {
// Specify the directory containing test classes
testClassesDirs = sourceSets.test.output.classesDirs


// Optionally configure test options
testLogging {
// Configure which events to log during test execution
events 'passed', 'skipped', 'failed'
}
finalizedBy jacocoTestReport
}


jar {
manifest {
attributes 'Main-Class': 'lib.*'
}


from sourceSets.main.output // Include compiled classes in the JAR
archiveBaseName = 'unleash-test' // Name of the JAR file
destinationDirectory = file('build/libs') // Output directory for the JAR file
}


jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
}
}


54 changes: 54 additions & 0 deletions ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'

- name: Build with Gradle
run: gradle build

- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts



path: build/libs/**

- name: Run Unit Test
run: gradle test

- name: Upload Test Reports
uses: actions/upload-artifact@v3
with:
name: test-reports
path: build/reports/tests/**
- name: Generate code coverage report
run: gradle jacocoTestReport

- name: Upload code coverage report
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: build/reports/jacoco/test/html/**

- name: Run Deployment
run: java -jar build/libs/unleash_test-V1.jar

Empty file modified docker/.yarn/releases/yarn-4.3.1.cjs
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions feature.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"New feature details"
Empty file modified frontend/.yarn/releases/yarn-4.3.1.cjs
100755 → 100644
Empty file.
Empty file modified frontend/check-imports.rc
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"node": ">=18"
},
"scripts": {
"build": "yarn run lint:material:icons && vite build",
"build": "vite build",
"dev": "vite",
"start": "vite",
"start:prod": "vite build && vite preview",
Expand Down
Empty file modified frontend/scripts/clean_orval_generated.sh
100755 → 100644
Empty file.

This file was deleted.

Loading
Loading