-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Añade soporte para Integración Continua
- Loading branch information
Showing
13 changed files
with
273 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM daniel00/ceedling:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp | ||
{ | ||
"name": "C++", | ||
"build": { "dockerfile": "Dockerfile" }, | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": [ | ||
"ms-vscode.cpptools-extension-pack", | ||
"numaru.vscode-ceedling-test-adapter", | ||
"tomoki1207.pdf", | ||
"eamodio.gitlens" | ||
] | ||
} | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "make setup" | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Ceedling CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
|
||
- name: Install Ceedling | ||
run: gem install ceedling | ||
|
||
- name: Run tests | ||
run: ceedling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.DS_Store | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "test", | ||
"defines": [ | ||
"TEST" | ||
], | ||
"intelliSenseMode": "linux-gcc-x64", | ||
"compilerPath": "/home/linuxbrew/.linuxbrew/bin/gcc", | ||
"cStandard": "c99", | ||
"cppStandard": "gnu++17", | ||
"includePath": [ | ||
"${workspaceFolder}/src/**", | ||
"${workspaceFolder}/build/test/mocks/**", | ||
"${workspaceFolder}/test/support/**", | ||
"/home/linuxbrew/.linuxbrew/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src" | ||
] | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Ceedling Test Explorer Debug", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/build/test/out/${command:ceedlingExplorer.debugTestExecutable}", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
], | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"C_Cpp.autoAddFileAssociations": false, | ||
|
||
"ceedlingExplorer.debugConfiguration": "Ceedling Test Explorer Debug", | ||
|
||
"editor.tabSize": 4, | ||
"editor.insertSpaces": true, | ||
"editor.stickyTabStops": true, | ||
"editor.indentSize": "tabSize", | ||
"editor.detectIndentation": true, | ||
|
||
"files.eol": "\n", | ||
"files.encoding": "utf8", | ||
"files.insertFinalNewline": true, | ||
"files.trimTrailingWhitespace": true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
# app-c-template | ||
# [NOMBRE DEL PROYECTO] | ||
|
||
Este repositorio contiene [DESCRIPCIÓN]. | ||
|
||
Corresponde a la capa de aplicación en la arquitectura sugerida en [project-guidelines](https://github.com/digicontrol-init9/project-guidelines). | ||
|
||
## Pre-requisitos | ||
|
||
Es necesario tanto [Docker](https://www.docker.com) como [Visual Studio Code](https://code.visualstudio.com), instalando el plugin `ms-vscode-remote.remote-containers`. | ||
|
||
## Primeros pasos | ||
|
||
Para trabajar sobre el repositorio pulsamos `F1` una vez dentro de Visual Studio Code y seleccionamos la opción `Dev Containers: Open Folder in Container`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
setup: | ||
git config core.hooksPath .dev/hooks | ||
git config --local core.autocrlf false | ||
git config pull.ff only |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
|
||
# Notes: | ||
# Sample project C code is not presently written to produce a release artifact. | ||
# As such, release build options are disabled. | ||
# This sample, therefore, only demonstrates running a collection of unit tests. | ||
|
||
:project: | ||
:use_exceptions: FALSE | ||
:use_test_preprocessor: TRUE | ||
:use_auxiliary_dependencies: TRUE | ||
:build_root: build | ||
# :release_build: TRUE | ||
:test_file_prefix: test_ | ||
:which_ceedling: gem | ||
:ceedling_version: 0.31.1 | ||
:default_tasks: | ||
- test:all | ||
|
||
#:test_build: | ||
# :use_assembly: TRUE | ||
|
||
#:release_build: | ||
# :output: MyApp.out | ||
# :use_assembly: FALSE | ||
|
||
:environment: | ||
|
||
:extension: | ||
:executable: .out | ||
|
||
:paths: | ||
:test: | ||
- +:test/** | ||
- -:test/support | ||
:source: | ||
- src/** | ||
:support: | ||
- test/support | ||
:libraries: [] | ||
|
||
:defines: | ||
# in order to add common defines: | ||
# 1) remove the trailing [] from the :common: section | ||
# 2) add entries to the :common: section (e.g. :test: has TEST defined) | ||
:common: &common_defines [] | ||
:test: | ||
- *common_defines | ||
- TEST | ||
:test_preprocess: | ||
- *common_defines | ||
- TEST | ||
|
||
:cmock: | ||
:mock_prefix: mock_ | ||
:when_no_prototypes: :warn | ||
:enforce_strict_ordering: TRUE | ||
:plugins: | ||
- :ignore | ||
- :callback | ||
:treat_as: | ||
uint8: HEX8 | ||
uint16: HEX16 | ||
uint32: UINT32 | ||
int8: INT8 | ||
bool: UINT8 | ||
|
||
# Add -gcov to the plugins list to make sure of the gcov plugin | ||
# You will need to have gcov and gcovr both installed to make it work. | ||
# For more information on these options, see docs in plugins/gcov | ||
:gcov: | ||
:reports: | ||
- HtmlDetailed | ||
:gcovr: | ||
:html_medium_threshold: 75 | ||
:html_high_threshold: 90 | ||
|
||
#:tools: | ||
# Ceedling defaults to using gcc for compiling, linking, etc. | ||
# As [:tools] is blank, gcc will be used (so long as it's in your system path) | ||
# See documentation to configure a given toolchain for use | ||
|
||
# LIBRARIES | ||
# These libraries are automatically injected into the build process. Those specified as | ||
# common will be used in all types of builds. Otherwise, libraries can be injected in just | ||
# tests or releases. These options are MERGED with the options in supplemental yaml files. | ||
:libraries: | ||
:placement: :end | ||
:flag: "-l${1}" | ||
:path_flag: "-L ${1}" | ||
:system: [] # for example, you might list 'm' to grab the math library | ||
:test: [] | ||
:release: [] | ||
|
||
:plugins: | ||
:load_paths: | ||
- "#{Ceedling.load_path}" | ||
:enabled: | ||
- stdout_pretty_tests_report | ||
- module_generator | ||
- xml_tests_report | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* [YOUR NAME] © [THE YEAR] | ||
*/ | ||
|
||
#include "template.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* [YOUR NAME] © [THE YEAR] | ||
*/ | ||
|
||
#ifndef TEMPLATE_H | ||
#define TEMPLATE_H | ||
|
||
#endif // TEMPLATE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifdef TEST | ||
|
||
#include "unity.h" | ||
|
||
#include "template.h" | ||
|
||
void setUp(void) | ||
{ | ||
} | ||
|
||
void tearDown(void) | ||
{ | ||
} | ||
|
||
void test_template_ToImplement(void) { | ||
TEST_IGNORE_MESSAGE("I'm alive uwu."); | ||
TEST_IGNORE_MESSAGE("Don't know where to start? Execute `ceedling help` in your terminal window."); | ||
} | ||
|
||
#endif // TEST |