Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
e2fd4ca
Make changes
maxi512 May 25, 2022
f1b34b9
new package-lock.json
maxi512 May 25, 2022
0c042fa
Remove unnecesary try-catch block
maxi512 May 25, 2022
843a11d
remove try-catch
maxi512 May 25, 2022
d9dae5b
Add sonarcloud
maxi512 May 25, 2022
8a4cd33
Merge remote-tracking branch 'origin/main' into feature/fixing-usernames
maxi512 May 25, 2022
9cfbeba
Fix workflow
maxi512 May 25, 2022
e97e8f8
Add some changes
maxi512 May 25, 2022
0d9aa4c
Add new change
maxi512 May 25, 2022
8ec20c0
Pls comment this PR
maxi512 May 25, 2022
60ae89b
Remove action
maxi512 May 25, 2022
031d021
Pongo action again
maxi512 May 25, 2022
054a019
Add if to workflow
maxi512 May 25, 2022
4b1c8ac
:fix:Add exclamation
maxi512 May 25, 2022
aaaf669
Add coverage generation
maxi512 May 25, 2022
8a2d952
Add step for report test results
maxi512 May 25, 2022
b7daf45
Fix action
maxi512 May 25, 2022
7558d39
fix path
maxi512 May 25, 2022
ab8589b
try publish test results
maxi512 May 25, 2022
41b2ac7
Change action file
maxi512 May 25, 2022
160e3b5
Test action
maxi512 May 25, 2022
05c9467
Change test results comments
maxi512 May 25, 2022
ce0f66a
Add permissions
maxi512 May 25, 2022
12df310
update pr workflow
maxi512 May 26, 2022
edea7c3
change comment test step title
maxi512 May 26, 2022
0fdc2f9
Merge branch 'main' into feature/fixing-usernames
maxi512 May 26, 2022
61087ba
:fix:Test new workflow
maxi512 May 27, 2022
d15a052
:fix: fix sonnar scan
maxi512 May 27, 2022
980a0b9
Params to action
maxi512 May 27, 2022
e29081b
:fix: empty
maxi512 May 27, 2022
c2c5a0a
:fix: Change line
maxi512 May 27, 2022
21d62e8
:fix: change workflow
maxi512 May 27, 2022
a4e3b9e
:fix: fix properties
maxi512 May 27, 2022
1d8ff57
:fix: fix directory
maxi512 May 27, 2022
d8c1632
:fix: change checkout
maxi512 May 27, 2022
51bb7be
:fix: add checkout
maxi512 May 27, 2022
5788d39
:fix: fix
maxi512 May 27, 2022
ffaebb4
:fix: remove sonar properties file
maxi512 May 27, 2022
6cea37c
Add project workflow
maxi512 May 27, 2022
f1469a2
change project name
maxi512 May 27, 2022
8a53678
Change token
maxi512 May 27, 2022
380d390
add deploy to heroku
maxi512 Jun 5, 2022
a191514
Change something to trigger again deploy
maxi512 Jun 5, 2022
afb390c
remove dotenv
maxi512 Jun 5, 2022
29c9e9f
fix port
maxi512 Jun 5, 2022
7b0ac9e
Change dockerfile
maxi512 Jun 5, 2022
4cf263d
change docker file
maxi512 Jun 5, 2022
959039d
change port
maxi512 Jun 5, 2022
a6772b8
Add newman test
maxi512 Jun 5, 2022
ab81f59
some changes
maxi512 Jun 5, 2022
1e4d672
another change
maxi512 Jun 5, 2022
7eaf3d7
another change
maxi512 Jun 5, 2022
dde3fa7
another changes
maxi512 Jun 5, 2022
9558acf
Merge pull request #6 from maxi512/feature/fixing-usernames
maxi512 Jun 5, 2022
3b59fc2
Update README.md
maxi512 Jun 7, 2022
9b3df04
change destination branch
maxi512 Jun 10, 2022
d969ed1
Merge branch 'main' of https://github.com/maxi512/typescript-api into…
maxi512 Jun 10, 2022
699fcee
change job name
maxi512 Jun 10, 2022
0f7258b
fix workflow
maxi512 Jun 10, 2022
92ec4db
Rename pullRequests.yml to create_PR_from_feature.yml
tscandalitta Jun 10, 2022
a425b87
Rename node.js.yml to node_install_and_build.yml
tscandalitta Jun 10, 2022
42de5c9
Update and rename node_install_and_build.yml to deploy_to_test.yml
tscandalitta Jun 10, 2022
51862dd
Rename automateProject.yml to update_project.yml
tscandalitta Jun 10, 2022
3df29c4
Add merge to main
maxi512 Jun 10, 2022
9979940
change text
maxi512 Jun 10, 2022
f572a3d
:fix: another text change
maxi512 Jun 10, 2022
c7ed65e
Merge pull request #10 from maxi512/feature/merge-to-master
tscandalitta Jun 10, 2022
06d9b59
workflow fixed
maxi512 Jun 10, 2022
0fd3109
Update deploy_to_test.yml
maxi512 Jun 10, 2022
7271651
:fix: text changed
maxi512 Jun 10, 2022
8af6308
Merge branch 'test' into feature/new-feature
maxi512 Jun 10, 2022
49a0086
Merge pull request #11 from maxi512/feature/new-feature
maxi512 Jun 10, 2022
85ab715
Update update_project.yml
tscandalitta Jun 10, 2022
733501c
Rename update_project.yml to update_project_in_progress.yml
tscandalitta Jun 10, 2022
50e2792
Create update_project_code_review.yml
tscandalitta Jun 10, 2022
fe3107e
change actiion version
maxi512 Jun 10, 2022
78312d4
Update deploy_to_test.yml
maxi512 Jun 10, 2022
942750a
Change text
maxi512 Jun 11, 2022
f5f32ec
:fix: another change
maxi512 Jun 11, 2022
8d9f774
Merge pull request #13 from maxi512/feature/delete-user
tscandalitta Jun 11, 2022
3c14e0b
change token
maxi512 Jun 11, 2022
bdfc058
Merge remote-tracking branch 'origin' into test
maxi512 Jun 11, 2022
5b61dde
Update update_project_in_progress.yml
tscandalitta Jun 11, 2022
181f2b8
:fix: change text
maxi512 Jun 11, 2022
be328c3
Merge branch 'feature/new-feature' of https://github.com/maxi512/type…
maxi512 Jun 11, 2022
0288581
Create update_project_testing.yml
tscandalitta Jun 11, 2022
a555be9
Merge remote-tracking branch 'origin' into test
maxi512 Jun 11, 2022
ea53bf1
:fix: change text
maxi512 Jun 11, 2022
ee361b1
Merge branch 'test' into feature/new-feature
maxi512 Jun 11, 2022
35d4b6f
Merge pull request #15 from maxi512/feature/new-feature2
maxi512 Jun 11, 2022
06f5ebe
Update update_project_testing.yml
tscandalitta Jun 11, 2022
4fda2cd
change action
maxi512 Jun 11, 2022
1c39691
Merge branch 'main' of https://github.com/maxi512/typescript-api into…
maxi512 Jun 11, 2022
fc1e916
Merge remote-tracking branch 'origin' into test
maxi512 Jun 11, 2022
08a92d2
:fix: text changed
maxi512 Jun 11, 2022
a3c51fb
Merge pull request #16 from maxi512/feature/maxi-feature
maxi512 Jun 11, 2022
9c9be58
Update update_project_testing.yml
tscandalitta Jun 11, 2022
7e0e758
fix workflow
maxi512 Jun 11, 2022
5cf1e5f
Merge branch 'main' of https://github.com/maxi512/typescript-api into…
maxi512 Jun 11, 2022
fa09bef
Merge remote-tracking branch 'origin' into test
maxi512 Jun 11, 2022
c448db5
Merge branch 'main' into feature/new-feature
tscandalitta Jun 11, 2022
6b9cdd7
Merge branch 'test' of https://github.com/maxi512/typescript-api into…
maxi512 Jun 11, 2022
2e0188e
:fix: another text change
maxi512 Jun 11, 2022
e61c5d8
Merge branch 'test' into feature/new-feature
tscandalitta Jun 11, 2022
61c4744
Merge pull request #14 from maxi512/feature/new-feature
tscandalitta Jun 11, 2022
35e4ba6
Merge branch 'test' into feature/new-branch-1000
maxi512 Jun 11, 2022
578b66b
Merge pull request #17 from maxi512/feature/new-branch-1000
maxi512 Jun 11, 2022
65a5387
Add config
maxi512 Jun 11, 2022
d5efa94
Merge remote-tracking branch 'origin' into test
maxi512 Jun 11, 2022
4f38cb5
Merge branch 'test' of https://github.com/maxi512/typescript-api into…
maxi512 Jun 11, 2022
6125c49
:fix: me case de hacer prs
maxi512 Jun 11, 2022
afe6a68
Merge branch 'test' into feature/test-test
maxi512 Jun 11, 2022
67b5f02
Merge pull request #18 from maxi512/feature/test-test
maxi512 Jun 11, 2022
2588e3b
another fix
maxi512 Jun 11, 2022
ff34671
Merge branch 'main' into test
maxi512 Jun 11, 2022
693d5b2
Update update_project_testing.yml
tscandalitta Jun 11, 2022
6854bfb
Update update_project_testing.yml
tscandalitta Jun 11, 2022
3dd601e
:fix:another commit
maxi512 Jun 11, 2022
19160f1
Update update_project_in_progress.yml
tscandalitta Jun 11, 2022
807733c
Update update_project_testing.yml
tscandalitta Jun 11, 2022
9a9072f
Merge branch 'test' into feature/new-branch-new
maxi512 Jun 11, 2022
a20e377
Update update_project_code_review.yml
tscandalitta Jun 11, 2022
7d14a36
Update update_project_in_progress.yml
tscandalitta Jun 11, 2022
6595051
Merge pull request #19 from maxi512/feature/new-branch-new
maxi512 Jun 11, 2022
90ddeb8
Create update_project_to_do.yml
tscandalitta Jun 11, 2022
478132f
Rename update_project_in_progress.yml to update_project_en_progreso.yml
tscandalitta Jun 11, 2022
0082afb
Rename update_project_testing.yml to update_project_deploy_testing.yml
tscandalitta Jun 11, 2022
f016c7d
Merge branch 'main' of https://github.com/maxi512/typescript-api into…
maxi512 Jun 11, 2022
f608cff
Merge remote-tracking branch 'origin' into test
maxi512 Jun 11, 2022
286f843
fix workflow
maxi512 Jun 11, 2022
757edb9
Merge remote-tracking branch 'origin' into test
maxi512 Jun 11, 2022
466459a
testing
maxi512 Jun 11, 2022
ed72851
other test
maxi512 Jun 11, 2022
9dec097
another fix
maxi512 Jun 11, 2022
bddabb7
other
maxi512 Jun 11, 2022
c172431
other test
maxi512 Jun 11, 2022
66b1301
pls work
maxi512 Jun 11, 2022
9beefee
Auto-merge main back to dev
actions-user Jun 11, 2022
c072261
another change
maxi512 Jun 11, 2022
224a8ff
Auto-merge main back to dev
actions-user Jun 11, 2022
d970c89
test action
maxi512 Jun 11, 2022
8c623e4
github-actions[bot] Jun 11, 2022
d381704
uncomment things
maxi512 Jun 11, 2022
2fad38d
github-actions[bot] Jun 11, 2022
568b5a0
move all cards
maxi512 Jun 11, 2022
b622aa4
move all cards
maxi512 Jun 11, 2022
f8b379f
github-actions[bot] Jun 11, 2022
3a3f1f6
move all cards
maxi512 Jun 11, 2022
faf674c
github-actions[bot] Jun 11, 2022
aeccef0
move all cards
maxi512 Jun 11, 2022
4e593cd
github-actions[bot] Jun 11, 2022
2c658a0
uncomment
maxi512 Jun 11, 2022
600c51a
Merge branch 'main' of https://github.com/maxi512/typescript-api into…
maxi512 Jun 11, 2022
a384d18
Update deploy_to_test.yml
tscandalitta Jun 11, 2022
b8854d9
Create deploy_to_production.yml
tscandalitta Jun 11, 2022
5888bf1
add deploy to prod
maxi512 Jun 11, 2022
14280e8
add deploy to prod
maxi512 Jun 11, 2022
26c9675
Change something to trigger again deploy
maxi512 Jun 11, 2022
fc5735a
remove unncesary lines
maxi512 Jun 11, 2022
3c72f59
remove unnecesary files
maxi512 Jun 11, 2022
a0a61c6
add lint
maxi512 Jun 20, 2022
9716f23
some message
maxi512 Jun 20, 2022
a098fd8
Keep calm and commit
maxi512 Jun 20, 2022
b0d4d27
lint in husky
maxi512 Jun 20, 2022
b321162
add npm install
maxi512 Jun 20, 2022
9732fdc
add lint-sataged
maxi512 Jun 20, 2022
d714681
Add draft pr
maxi512 Jun 26, 2022
1b1701b
add secret
maxi512 Jun 26, 2022
c629be9
add new permissions
maxi512 Jun 26, 2022
3916c4a
:fix: another try
maxi512 Jun 26, 2022
873b7fa
change token
maxi512 Jun 26, 2022
dc25532
Merge branch 'main' into feature/test-draft3
maxi512 Jun 26, 2022
d0e91ca
:fix: another try
maxi512 Jun 26, 2022
c20517e
change permissions
maxi512 Jun 27, 2022
07a56bf
:fix: some changes
maxi512 Jun 27, 2022
96a8836
Merge branch 'main' of https://github.com/maxi512/typescript-api into…
maxi512 Jul 9, 2022
cd991f9
Move project workflows to directory
maxi512 Jul 9, 2022
0211415
To directory
maxi512 Jul 9, 2022
d731291
change event
maxi512 Jul 9, 2022
ccb8fba
to root folder
maxi512 Jul 9, 2022
e72e006
change pr draft creation
maxi512 Jul 9, 2022
741835d
set tokens
maxi512 Jul 9, 2022
814307a
:fix: some change
maxi512 Jul 9, 2022
db44d2e
Merge pull request #29 from maxi512/feature/last-test2
Horus98 Jul 9, 2022
fbe49dc
github-actions[bot] Jul 9, 2022
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
75 changes: 75 additions & 0 deletions .github/workflows/create_PR_from_feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Create PR

on:
push:
branches: [ 'feature/*']

jobs:
pr-to-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: pull-request
uses: repo-sync/pull-request@v2
with:
destination_branch: "test"
pr_title: "Pull ${{ github.ref_name }} into test"
pr_body: ":crown: PR Automatizado por la action"
github_token: ${{ secrets.GITHUB_TOKEN }}

- run: gh extension install kyanny/gh-pr-draft
env:
GITHUB_TOKEN: ${{ secrets.GHTOKEN }}
- run: gh pr-draft
env:
GITHUB_TOKEN: ${{ secrets.GHTOKEN }}

comment-pr:
runs-on: ubuntu-latest
if: ${{ startsWith(github.event.head_commit.message, ':fix:') }}
needs: pr-to-test
steps:
- uses: actions/checkout@v3
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_KEY }}
with:
args: >
-Dsonar.organization=maxi512
-Dsonar.projectKey=maxi512_typescript-api
-Dsonar.sources=src/

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm ci
- run: npm run build --if-present
- run: npm test

- name: Comment Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
comment_title: "Tests Results"

- run: gh pr ready
env:
GITHUB_TOKEN: ${{ secrets.GHTOKEN }}

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
16 changes: 16 additions & 0 deletions .github/workflows/deploy_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Mover la tarjeta del pull request a "Desplegado en Testing"

on:
pull_request:
types: [closed]

jobs:
automate-project-columns:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: alex-page/github-project-automation-plus@v0.8.1
with:
project: Features
column: Desplegado en Testing
repo-token: ${{ secrets.GHTOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/deploy_to_production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy a produccion

on: [workflow_dispatch]

jobs:
merge-and-deploy-to-production:
runs-on: ubuntu-latest
steps:
- name: Merge test -> main
uses: devmasx/merge-branch@master
with:
type: now
from_branch: test
target_branch: main
github_token: ${{ github.token }}

- uses: actions/checkout@v3

- name: Build, Push and Release a Docker container to Heroku.
uses: gonuit/heroku-docker-deploy@v1.3.3
with:
email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_APP_NAME_MAIN }}

- uses: HiromiShikata/gh-actions-move-all-cards-on-projects@v1.0.1
with:
project_name: Features
from_column_name: Desplegado en Testing
to_column_name: Desplegado en Produccion
github_token: ${{ secrets.GHTOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/deploy_to_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ test ]

jobs:
build:
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
packages: write

steps:
- uses: actions/checkout@v3

- name: Build, Push and Release a Docker container to Heroku.
uses: gonuit/heroku-docker-deploy@v1.3.3
with:
email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}

- uses: matt-ball/newman-action@master
with:
apiKey: ${{ secrets.POSTMAN_API_KEY }}
collection: ${{ secrets.POSTMAN_COLLECTION }}
environment: ${{ secrets.POSTMAN_ENVIRONMENT }}
24 changes: 0 additions & 24 deletions .github/workflows/node.js.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/pullRequests.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/to_code_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Mover la tarjeta del pull request a "Code review pendiente"

on:
pull_request:
types: [review_requested]

jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- uses: alex-page/github-project-automation-plus@v0.8.1
with:
project: Features
column: Code review pendiente
repo-token: ${{ secrets.GHTOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/to_en_progreso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Mover la tarjeta del pull request a "En desarrollo"

on:
pull_request:
types: [assigned]

jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- uses: alex-page/github-project-automation-plus@v0.8.1
with:
project: Features
column: En desarrollo
repo-token: ${{ secrets.GHTOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/update_project_to_do.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Mover la tarjeta del pull request a "To do"

on:
pull_request:
types: [converted_to_draft]

jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- uses: alex-page/github-project-automation-plus@v0.8.1
with:
project: Features
column: To do
repo-token: ${{ secrets.GHTOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ dist

# TernJS port file
.tern-port
junit.xml
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ COPY . .

FROM base as production

ENV NODE_PATH=./build
RUN npm run build

RUN npm run build
CMD npm start
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ npm run build
Run it:
```shell
npm start
```
```

Run it with docker-compose:
```shell
docker-compose up
```
7 changes: 7 additions & 0 deletions junit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="jest tests" tests="1" failures="0" errors="0" time="3.501">
<testsuite name="test add function" errors="0" failures="0" skipped="0" timestamp="2022-05-25T23:12:56" time="3.437" tests="1">
<testcase classname="test add function should start with four users" name="test add function should start with four users" time="1.367">
</testcase>
</testsuite>
</testsuites>
Loading