Skip to content

Commit

Permalink
Merge pull request #24 from WillyTonkas/dev
Browse files Browse the repository at this point in the history
feature(general): Added initial functionality, workflows, issue templates
  • Loading branch information
FranCalveyra authored Dec 28, 2024
2 parents 47481c1 + bcb6e84 commit 30320e0
Show file tree
Hide file tree
Showing 16 changed files with 773 additions and 10 deletions.
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/non-functional-requirement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: Non-Functional Requirement
about: Requirement that's not a feature itself but needs to be met
title: NFR - Current Requirement Name
labels: NFR
assignees: ''

---

Certainly! Here’s a **Non-Functional Requirement (NFR) Template** to document your non-functional requirements effectively:

---

### **Non-Functional Requirement (NFR) Template**

#### **1. Title**
- A concise and descriptive title for the NFR.
Example: **System Performance Under Load**

---
#### **3. Description**
- A detailed description of what the NFR entails.
Example:
_The system should maintain a response time of under 2 seconds for 95% of all user requests under a load of 1,000 concurrent users._

---

#### **3. Category**
- Specify the category of the NFR (choose one or add a custom category):
- **Performance**
- **Security**
- **Scalability**
- **Usability**
- **Availability**
- **Compliance**
- **Maintainability**
- **Portability**

---

#### **4. Acceptance Criteria**
- Define how this NFR will be measured and validated.
Example:
- Response time logs will be collected during a stress test simulating 1,000 concurrent users.
- 95% of requests should complete in under 2 seconds.
---

#### **5. Priority**
- Indicate the importance of this requirement.
Example:
- High
- Medium
- Low

---

#### **6. Dependencies**
- List any other requirements, systems, or tasks that this NFR depends on.
Example:
_Dependent on database optimization (Task-DB-004)._
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/use-case.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Use Case
about: Use case for the project that needs to be worked in
title: Use Case - Current Use Case Name
labels: Use Case
assignees: ''

---

#### **User Story**
- **As a**: *(Type of user)*
- **I’d like to**: *(Action to be performed)*
- **In order to**: *(Goal to be accomplished)*

---

#### **Acceptance Criteria**
- What must happen for this use case to be considered successful.
Example:
- The action must be executed within 2 seconds.
- Proper feedback (success/failure) must be provided to the user.

---

#### **Notes**
- *(Additional details, conditions, or rules for the use case)*
45 changes: 45 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CD Workflow
# TODO: Make the binary for the workflow to compile correctly
on:
push:
branches:
- main
release:
types: [created]

jobs:
build-and-deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:

- name: Checkout code
uses: actions/checkout@v3


- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.23'


- name: Build binary
run: go build -o rpl-service ../../main/main.go

- name: Upload Go artifact
uses: actions/upload-artifact@v4
with:
name: rpl-service
path: rpl-service


- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
github-token: ${{ secrets.DEPLOY_TOKEN }}
pages-branch: main
pages-path: /
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI Workflow

on:
pull_request:
branches: [ "main", "dev" ]
push:
branches-ignore: [ "main" ]

jobs:
lint-and-test:
runs-on: ubuntu-latest
permissions:
contents: read

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

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.23'

- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Check formatting with gofmt
run: |
echo "Checking code formatting with gofmt..."
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "The following files are not formatted:"
echo "$unformatted"
exit 1
fi
- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.62.2

- name: Run go vet
run: go vet ./...

- name: Run tests
run: go test ./... -v
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
.idea
*.iml
Loading

0 comments on commit 30320e0

Please sign in to comment.