Skip to content

Commit

Permalink
Merge branch 'main' into feature/complex_conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoLiberali committed Dec 16, 2023
2 parents 9107f17 + 59786d2 commit 013e899
Show file tree
Hide file tree
Showing 90 changed files with 4,965 additions and 270 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ jobs:
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]
Expand Down Expand Up @@ -130,21 +110,3 @@ jobs:
with:
name: docker-compose-e2e-logs
path: app.log

sonarcloud:
name: SonarCloud
needs: [check-style, integration-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download line coverage reports
uses: actions/download-artifact@v3
with:
name: coverage
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: cli
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
paths:
- cli/**

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

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 ./cli/... -coverprofile=coverage_unit.out -v
- uses: actions/upload-artifact@v3
with:
name: coverage_unit
path: coverage_unit.out
27 changes: 14 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Contribute to the development of badaas

- [Tests](#tests)
- [Dependencies](#dependencies)
- [Unit tests](#unit-tests)
- [Integration tests](#integration-tests)
- [Feature tests (of end to end tests)](#feature-tests-or-end-to-end-tests)
- [Logger](#logger)
- [Directory structure](#directory-structure)
- [Git](#git)
- [Branch naming policy](#branch-naming-policy)
- [Default branch](#default-branch)
- [How to release](#how-to-release)
# Contribute to the development of badaas

- [Contribute to the development of badaas](#contribute-to-the-development-of-badaas)
- [Tests](#tests)
- [Dependencies](#dependencies)
- [Unit tests](#unit-tests)
- [Integration tests](#integration-tests)
- [Feature tests (or end to end tests)](#feature-tests-or-end-to-end-tests)
- [Logger](#logger)
- [Directory structure](#directory-structure)
- [Git](#git)
- [Branch naming policy](#branch-naming-policy)
- [Default branch](#default-branch)
- [How to release](#how-to-release)

## Tests

Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ Badaas enables the effortless construction of ***distributed, resilient, highly
> **Warning**
> BaDaaS is still under development. Each of its components can have a different state of evolution that you can consult in [Features and components](#features-and-components)
- [Features and components](#features-and-components)
- [Quickstart](#quickstart)
- [Example](#example)
- [Step-by-step instructions](#step-by-step-instructions)
- [Configuration](#configuration)
- [Contributing](#contributing)
- [License](#license)
- [BADAAS: Backend And Distribution As A Service](#badaas-backend-and-distribution-as-a-service)
- [Features and components](#features-and-components)
- [Quickstart](#quickstart)
- [Example](#example)
- [Step-by-step instructions](#step-by-step-instructions)
- [Config badaas functionalities](#config-badaas-functionalities)
- [Add your own functionalities](#add-your-own-functionalities)
- [Run it](#run-it)
- [Provided functionalities](#provided-functionalities)
- [InfoModule](#infomodule)
- [AuthModule](#authmodule)
- [Configuration](#configuration)
- [Contributing](#contributing)
- [License](#license)

## Features and components

Expand Down
73 changes: 73 additions & 0 deletions cli/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Contribute to the development of badaas

- [Local compilation](#local-compilation)
- [Tests](#tests)
- [Unit tests](#unit-tests)
- [Git](#git)
- [Branch naming policy](#branch-naming-policy)
- [Default branch](#default-branch)
- [How to release](#how-to-release)

## Local compilation

You can make modifications to the badaas-cli source code and compile it locally with:

```bash
go build .
```

You can then run the badaas-cli executable directly or add a link in your $GOPATH to run it from a project:

```bash
ln -sf badaas-cli $GOPATH/bin/badaas-cli
```

## Tests

### Unit tests

We use the standard test suite in combination with [github.com/stretchr/testify](https://github.com/stretchr/testify) to do our unit testing.

To run them, please run:

```sh
make test_unit
```

## Git

### Branch naming policy

`[BRANCH_TYPE]/[BRANCH_NAME]`

- `BRANCH_TYPE` is a prefix to describe the purpose of the branch.
Accepted prefixes are:
- `feature`, used for feature development
- `bugfix`, used for bug fix
- `improvement`, used for refactor
- `library`, used for updating library
- `prerelease`, used for preparing the branch for the release
- `release`, used for releasing project
- `hotfix`, used for applying a hotfix on main
- `poc`, used for proof of concept
- `BRANCH_NAME` is managed by this regex: `[a-z0-9._-]` (`_` is used as space character).

### Default branch

The default branch is `main`. Direct commit on it is forbidden. The only way to update the application is through pull request.

Release tag are only done on the `main` branch.

### How to release

We use [Semantic Versioning](https://semver.org/spec/v2.0.0.html) as guideline for the version management.

Steps to release:

- Create a new branch labeled `release/vX.Y.Z` from the latest `main`.
- Improve the version number in `changelog.md`.
- Verify the content of the `changelog.md`.
- Commit the modifications with the label `Release version X.Y.Z`.
- Create a pull request on github for this branch into `main`.
- Once the pull request validated and merged, tag the `main` branch with `vX.Y.Z`.
- After the tag is pushed, make the release on the tag in GitHub.
Loading

0 comments on commit 013e899

Please sign in to comment.