From 78711e5aabf1cd3ef7bf2cca0c355f046d7bc477 Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 09:06:52 +0300 Subject: [PATCH 01/13] coverage test --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 42c52d0..c45f97a 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,4 @@ You should write in total four JavaScript functions, it is recommended to do it The instructions are specified in TODO comments. Do not forget to provide sufficient (automatic) tests for your code! -Use you preferred way (node , ecommerce.test.js) - -COVERAGE TEST \ No newline at end of file +Use you preferred way (node , ecommerce.test.js) \ No newline at end of file From b51708e589b9cc85436ea748fe314c3fc687e83b Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 09:08:05 +0300 Subject: [PATCH 02/13] test --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c45f97a..42c52d0 100644 --- a/README.md +++ b/README.md @@ -39,4 +39,6 @@ You should write in total four JavaScript functions, it is recommended to do it The instructions are specified in TODO comments. Do not forget to provide sufficient (automatic) tests for your code! -Use you preferred way (node , ecommerce.test.js) \ No newline at end of file +Use you preferred way (node , ecommerce.test.js) + +COVERAGE TEST \ No newline at end of file From ecdc9ea5ba11c6e27c68c55b358f8b283f18c243 Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 09:10:07 +0300 Subject: [PATCH 03/13] ignore branches --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6689c72..07d6721 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,9 +8,11 @@ on: push: branches-ignore: - 'hotfix/**' + - 'Hotfix/**' pull_request: branches-ignore: - 'hotfix/**' + - 'Hotfix/**' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: From 534e377e97c8b40fb14f70916b59499794356fe2 Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 09:29:33 +0300 Subject: [PATCH 04/13] test --- .github/workflows/main.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07d6721..0dd1af3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,14 +5,6 @@ name: CI # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the main branch - push: - branches-ignore: - - 'hotfix/**' - - 'Hotfix/**' - pull_request: - branches-ignore: - - 'hotfix/**' - - 'Hotfix/**' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -25,6 +17,7 @@ jobs: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job + if: github.ref != 'refs/heads/hotfix/**' steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 From f257522de0467492380f3e2f3b9c1133f68d8713 Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 10:16:02 +0300 Subject: [PATCH 05/13] git yaml test --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0dd1af3..e4b55d8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job - if: github.ref != 'refs/heads/hotfix/**' + if: ${{ github.ref != 'refs/heads/hotfix/**' }} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 From aebb364aa1839738a9732e31cfcbaaa344e40587 Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 10:18:45 +0300 Subject: [PATCH 06/13] fix yaml --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4b55d8..2533920 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,10 @@ name: CI # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the main branch - + push: + branches: [ main ] + pull_request: + branches: [ main ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: From 2720553094f1e502073e278820205533f31781e6 Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 10:37:34 +0300 Subject: [PATCH 07/13] branch negation --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2533920..14e3a10 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job - if: ${{ github.ref != 'refs/heads/hotfix/**' }} + if: ${{ github.ref != ^refs/heads/hotfix/** }} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 From 0b18646b93f52f22b8e453812f238a80e60fa171 Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 10:38:52 +0300 Subject: [PATCH 08/13] branch negation --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14e3a10..57e26fd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job - if: ${{ github.ref != ^refs/heads/hotfix/** }} + if: ${{ github.ref == ^refs/heads/hotfix/** }} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 From 457473809604995586182a1b53f81e204ff8843c Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 10:40:07 +0300 Subject: [PATCH 09/13] branch negation --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57e26fd..98d53bc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job - if: ${{ github.ref == ^refs/heads/hotfix/** }} + if: ${{ github.ref =~ ^refs/heads/hotfix/** }} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 From 68f184829f7f37c92006fbcbd7f4fbc8b4568eb3 Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 10:43:47 +0300 Subject: [PATCH 10/13] branch negation test --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98d53bc..8b79042 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job - if: ${{ github.ref =~ ^refs/heads/hotfix/** }} + if: ${{ !contains(github.ref, 'hotfix') }} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 From b8587cc21bce245a79e06626b76b43b3e64b5391 Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 10:46:12 +0300 Subject: [PATCH 11/13] echo --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b79042..8d5b265 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,6 +26,7 @@ jobs: - uses: actions/checkout@v3 - name: Run tests and collect coverage run: | + echo $${github.ref} npm install npm run test -- --coverage src/ From 15a2921b5f878dd5be593369d6587c1bbd73c0be Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 14:05:55 +0300 Subject: [PATCH 12/13] echo ref --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8d5b265..81c4efa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v3 - name: Run tests and collect coverage run: | - echo $${github.ref} + echo $${{ github.ref }} npm install npm run test -- --coverage src/ From 52182e277a243db3cc9569e8d3034b31da07277f Mon Sep 17 00:00:00 2001 From: markjuno Date: Sun, 10 Apr 2022 20:45:59 +0300 Subject: [PATCH 13/13] actions yaml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 81c4efa..7c8f6a5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job - if: ${{ !contains(github.ref, 'hotfix') }} + if: ${{ contains(github.head_ref, 'hotfix') == false }} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3