Skip to content

Commit 68728e8

Browse files
authored
Merge pull request #10 from mathmelo/develop
version 1.0
2 parents e71207b + d497f97 commit 68728e8

File tree

8 files changed

+107
-1
lines changed

8 files changed

+107
-1
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.js @mathmelo

.github/PULL_REQUEST_TEMPLATE.MD

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Description
2+
3+
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
4+
5+
Fixes # (issue)
6+
7+
## Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
16+
# How Has This Been Tested?
17+
18+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
19+
20+
- [ ] Test A
21+
- [ ] Test B
22+
23+
**Test Configuration**:
24+
* Firmware version:
25+
* Hardware:
26+
* Toolchain:
27+
* SDK:
28+
29+
# Checklist:
30+
31+
- [ ] My code follows the style guidelines of this project
32+
- [ ] I have performed a self-review of my code
33+
- [ ] I have commented my code, particularly in hard-to-understand areas
34+
- [ ] I have made corresponding changes to the documentation
35+
- [ ] My changes generate no new warnings
36+
- [ ] I have added tests that prove my fix is effective or that my feature works
37+
- [ ] New and existing unit tests pass locally with my changes
38+
- [ ] Any dependent changes have been merged and published in downstream modules

.github/workflows/ci.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: ci-node-workflow
2+
on:
3+
pull_request:
4+
branches:
5+
- develop
6+
jobs:
7+
check-application:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
12+
with:
13+
node-version: 20
14+
- run: npm run test
15+
- run: npm run start
16+
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v3
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Login to Docker Hub
24+
uses: docker/login-action@v3
25+
with:
26+
username: ${{ secrets.DOCKERHUB_USERNAME }}
27+
password: ${{ secrets.DOCKERHUB_TOKEN }}
28+
29+
- name: Build and push
30+
id: docker_build
31+
uses: docker/build-push-action@v5
32+
with:
33+
context: .
34+
push: true
35+
tags: mathmelo/ci-github-actions:latest

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:20
2+
3+
WORKDIR /app
4+
5+
COPY . .
6+
7+
CMD ["npm", "run", "start"]

index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function soma(a, b) {
2+
return a + b
3+
}
4+
5+
console.log('passou aqui')
6+
7+
module.exports = soma

index.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const soma = require('./index.js')
2+
const { deepStrictEqual } = require('assert')
3+
4+
;(async () => {
5+
deepStrictEqual(30, soma(15, 15))
6+
})()

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "gitsign",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"scripts": {
6+
"start": "node index.js",
7+
"test": "node index.test.js"
8+
},
9+
"keywords": [],
10+
"author": "",
11+
"license": "ISC",
12+
"description": ""
13+
}

0 commit comments

Comments
 (0)