From f34c83509665a86ec512690acfd98718a94a9781 Mon Sep 17 00:00:00 2001 From: alexsanderp Date: Mon, 7 Feb 2022 11:45:05 -0300 Subject: [PATCH 1/6] Adding npm_run test --- .github/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..dcb99c0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,18 @@ +name: Test +on: + pull_request: + branches: + - dev + - stg + - main + +jobs: + deploy: + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: NPM Run Test + run: | + npm run test From be0cda3547a633f2b1d4463da7dd3c51e1bc3d78 Mon Sep 17 00:00:00 2001 From: alexsanderp Date: Mon, 7 Feb 2022 11:47:29 -0300 Subject: [PATCH 2/6] NPM Test --- .github/workflows/test.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dcb99c0..2818a65 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,12 +7,20 @@ on: - main jobs: - deploy: + test: runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 + - name: Build + env: + ENV: ${{ steps.extract_environment.outputs.result }} + IMAGE_TAG: latest + run: | + export ENV=$ENV + docker-compose -f build.docker-compose.yml build + - name: NPM Run Test run: | - npm run test + docker-compose run --rm maestro npm run test From e00432c705eff25a3da8c0a9a8cf7a9de691dc4d Mon Sep 17 00:00:00 2001 From: alexsanderp Date: Mon, 7 Feb 2022 12:02:30 -0300 Subject: [PATCH 3/6] Update test build --- .github/workflows/test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2818a65..44685e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,12 +13,16 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Install Docker Compose + run: | + python3 -m pip install docker-compose --upgrade + - name: Build env: ENV: ${{ steps.extract_environment.outputs.result }} IMAGE_TAG: latest run: | - export ENV=$ENV + export ENV=test docker-compose -f build.docker-compose.yml build - name: NPM Run Test From b52549649c31d81374214295e2e114200aa6d36a Mon Sep 17 00:00:00 2001 From: alexsanderp Date: Mon, 7 Feb 2022 12:09:51 -0300 Subject: [PATCH 4/6] Update test build --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44685e0..c3e4d86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,4 +27,5 @@ jobs: - name: NPM Run Test run: | + export ENV=test docker-compose run --rm maestro npm run test From 57be80b3f8e47458238b86fff59ff7cda6b6da92 Mon Sep 17 00:00:00 2001 From: alexsanderp Date: Mon, 7 Feb 2022 15:08:42 -0300 Subject: [PATCH 5/6] Rename test --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3e4d86..3f78e08 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: export ENV=test docker-compose -f build.docker-compose.yml build - - name: NPM Run Test + - name: Run Test run: | export ENV=test docker-compose run --rm maestro npm run test From 6a5294c68bcd0794ecfa52923763468ea48ff7ba Mon Sep 17 00:00:00 2001 From: alexsanderp Date: Tue, 8 Feb 2022 14:29:55 -0300 Subject: [PATCH 6/6] New: Adding semantic versioning --- .github/workflows/deploy.yml | 14 +++++++++++ .releaserc.json | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .releaserc.json diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 45367db..5d1e52f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,6 +13,20 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v2 + id: semantic + with: + semantic_version: 16 + extra_plugins: | + @semantic-release/changelog + @semantic-release/git + conventional-changelog-eslint + branches: | + ['main'] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Update Pip run: | python3 -m pip install --upgrade pip diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..49fa875 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,48 @@ +{ + "branch": "dev", + "plugins": [ + [ + "@semantic-release/commit-analyzer", + { + "preset": "eslint", + "releaseRules": [ + { "tag": "Breaking", "release": "major" }, + { "tag": "Build", "release": "minor" }, + { "tag": "Chore", "release": "minor" }, + { "tag": "Fix", "release": "patch" }, + { "tag": "New", "release": "minor" }, + { "tag": "Update", "release": "minor" }, + { "tag": "Upgrade", "release": "minor" } + ] + } + ], + [ + "@semantic-release/release-notes-generator", + { + "preset": "eslint", + "releaseRules": [ + { "tag": "Breaking", "release": "major" }, + { "tag": "Build", "release": "minor" }, + { "tag": "Chore", "release": "minor" }, + { "tag": "Fix", "release": "patch" }, + { "tag": "New", "release": "minor" }, + { "tag": "Update", "release": "minor" }, + { "tag": "Upgrade", "release": "minor" } + ] + } + ], + [ + "@semantic-release/changelog", + { + "changelogFile": "CHANGELOG.md" + } + ], + "@semantic-release/github", + [ + "@semantic-release/git", { + "assets": ["package.json", "CHANGELOG.md"], + "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + } + ] + ] +}