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

Operators #3

Open
wants to merge 15 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
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: Bug
---

## Describe the bug

A clear and concise description of what the bug is.

## To Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Expected behavior

A clear and concise description of what you expected to happen.

## Screenshots

If applicable, add screenshots to help explain your problem.

## Application

Please complete the following information:

- badaas version [X.X.X] or commit hash

## Additional context

Add any other context about the problem here.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/user_story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: User Story, To be verify
---

## Description

**As a** `[roles impacted]`,

**I want** `[clear context and goals]`

**so that** `[result of this story]`.

## Acceptance Criteria

**Scenario** | `[the name for the behavior that will be described]`
------------ | -------------------------------------------------
**Given** | `[the beginning state of the scenario]`
**When** | `[specific action that the user makes]`
**Then** | `[the outcome of the action in “When”]`
**And** | `[used to continue any of three previous statements]`

### Constraints

`[Put all others constraints here, like list of acceptances values or other]`

## Resources

`[Put all your resources here, like mockups, diagrams or other here]`

## Notes

`[Some complementary notes if necessary]`

## Links

`[Only use by the team, to link this feature with epic, technical tasks or bugs]`
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:information_source: Don't forget to modify the changelog.md before merging this branch.
78 changes: 78 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
branch-naming-rules:
name: Check branch name
runs-on: ubuntu-latest
steps:
- uses: deepakputhraya/action-branch-name@master
with:
regex: '^(feature|bugfix|improvement|library|prerelease|release|hotfix|poc)\/[a-z0-9_.-]+$'
allowed_prefixes: 'feature,bugfix,improvement,library,prerelease,release,hotfix,poc'
ignore: main,dev
min_length: 5
max_length: 50

check-style:
name: Code style
needs: [branch-naming-rules]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: '^1.18'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
skip-cache: true
skip-pkg-cache: true
skip-build-cache: true

unit-tests:
name: Unit tests
needs: [branch-naming-rules]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: '^1.18'
cache: true
- name: Run unit tests
run: go test ./... -coverprofile=coverage_unit.out -v
- uses: actions/upload-artifact@v3
with:
name: coverage_unit
path: coverage_unit.out

sonarcloud:
name: SonarCloud
needs: [unit-tests, check-style]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download unit tests line coverage report
uses: actions/download-artifact@v3
with:
name: coverage_unit
path: coverage_unit.out
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
vendor/

# Go workspace file
go.work

# vscode conf
.vscode

# binary output
badaas-cli

# test results
cmd/gen/conditions/*_conditions.go
Loading