From 9867136e91594f82c306c1b3ec6d2b54940e8328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serkan=20=C3=96zel?= Date: Wed, 14 Jul 2021 17:41:25 +0300 Subject: [PATCH 1/7] Add test pr --- .github/workflows/test_pr.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/test_pr.yml diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml new file mode 100644 index 000000000..cd94c6c8e --- /dev/null +++ b/.github/workflows/test_pr.yml @@ -0,0 +1,36 @@ +name: Test PR +on: pull_request + +jobs: + test-pr: + name: Build PR (${{matrix.os}}) + runs-on: ${{matrix.os}} + + strategy: + matrix: + os: [ ubuntu-latest, windows-latest ] + + steps: + - name: Setup Java + uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 10 + - name: Checkout code + uses: actions/checkout@v2 + - name: Install dependencies and compile client + run: | + npm install + npm run compile + - name: Lint + run: | + npm run lint + - name: Validate User Code + run: | + npm run validate-user-code + - name: Run OS tests + run: | + npm run coverage From d096d872bbd3c0d37f3cfa1bd5f4fe198c00b315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serkan=20=C3=96zel?= Date: Wed, 14 Jul 2021 17:45:06 +0300 Subject: [PATCH 2/7] Change name --- .github/workflows/test_pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index cd94c6c8e..98fbded5d 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -1,9 +1,9 @@ -name: Test PR +name: PR Builder on: pull_request jobs: test-pr: - name: Build PR (${{matrix.os}}) + name: Test PR (${{matrix.os}}) runs-on: ${{matrix.os}} strategy: From 877b8f72951214b60d40b9d107caf3f8bdc69501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serkan=20=C3=96zel?= Date: Wed, 14 Jul 2021 18:12:59 +0300 Subject: [PATCH 3/7] Add test branch workflow --- .github/workflows/test_branch.yml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/test_branch.yml diff --git a/.github/workflows/test_branch.yml b/.github/workflows/test_branch.yml new file mode 100644 index 000000000..a828002f7 --- /dev/null +++ b/.github/workflows/test_branch.yml @@ -0,0 +1,43 @@ +name: Test Branch +on: + push: + branches-ignore: + - 'gh-pages' + tags-ignore: + - '*' + +jobs: + test-branch: + name: Test Branch (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ ubuntu-latest, windows-latest ] + + steps: + - name: Setup Java + uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 10 + - name: Checkout code + uses: actions/checkout@v2 + - name: Install dependencies and compile client + run: | + npm install + npm run compile + - name: Lint + run: | + npm run lint + - name: Validate User Code + run: | + npm run validate-user-code + - name: Run Enterprise tests + env: + HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} + run: | + npm run coverage From 9b6781a50b71e42167f32c0879713e0f4cec7d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serkan=20=C3=96zel?= Date: Wed, 14 Jul 2021 18:20:32 +0300 Subject: [PATCH 4/7] Add line ending conversion --- .github/workflows/test_branch.yml | 4 ++++ .github/workflows/test_pr.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/test_branch.yml b/.github/workflows/test_branch.yml index a828002f7..160b2178d 100644 --- a/.github/workflows/test_branch.yml +++ b/.github/workflows/test_branch.yml @@ -30,6 +30,10 @@ jobs: run: | npm install npm run compile + - name: Disable line ending conversion of git + if: ${{ matrix.os == 'windows-latest'}} + run: | + git config --global core.autocrlf false - name: Lint run: | npm run lint diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index 98fbded5d..a914db0b4 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -25,6 +25,10 @@ jobs: run: | npm install npm run compile + - name: Disable line ending conversion of git + if: ${{ matrix.os == 'windows-latest'}} + run: | + git config --global core.autocrlf false - name: Lint run: | npm run lint From cb8c3fc27f4921599586d8501fbeb91b109be4fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serkan=20=C3=96zel?= Date: Wed, 14 Jul 2021 18:23:03 +0300 Subject: [PATCH 5/7] Fix --- .github/workflows/test_branch.yml | 8 ++++---- .github/workflows/test_pr.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_branch.yml b/.github/workflows/test_branch.yml index 160b2178d..d330cbb2d 100644 --- a/.github/workflows/test_branch.yml +++ b/.github/workflows/test_branch.yml @@ -24,16 +24,16 @@ jobs: uses: actions/setup-node@v2 with: node-version: 10 + - name: Disable line ending conversion of git + if: ${{ matrix.os == 'windows-latest'}} + run: | + git config --global core.autocrlf false - name: Checkout code uses: actions/checkout@v2 - name: Install dependencies and compile client run: | npm install npm run compile - - name: Disable line ending conversion of git - if: ${{ matrix.os == 'windows-latest'}} - run: | - git config --global core.autocrlf false - name: Lint run: | npm run lint diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index a914db0b4..21efbc9f4 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -19,16 +19,16 @@ jobs: uses: actions/setup-node@v2 with: node-version: 10 + - name: Disable line ending conversion of git + if: ${{ matrix.os == 'windows-latest'}} + run: | + git config --global core.autocrlf false - name: Checkout code uses: actions/checkout@v2 - name: Install dependencies and compile client run: | npm install npm run compile - - name: Disable line ending conversion of git - if: ${{ matrix.os == 'windows-latest'}} - run: | - git config --global core.autocrlf false - name: Lint run: | npm run lint From 60eafb55aed383d1ca00107cd965197dd579b082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serkan=20=C3=96zel?= Date: Wed, 4 Aug 2021 23:20:20 +0300 Subject: [PATCH 6/7] Merge test workflows into one --- .github/workflows/{test_branch.yml => ci.yml} | 6 +++ .github/workflows/test_pr.yml | 40 ------------------- 2 files changed, 6 insertions(+), 40 deletions(-) rename .github/workflows/{test_branch.yml => ci.yml} (86%) delete mode 100644 .github/workflows/test_pr.yml diff --git a/.github/workflows/test_branch.yml b/.github/workflows/ci.yml similarity index 86% rename from .github/workflows/test_branch.yml rename to .github/workflows/ci.yml index d330cbb2d..320799de2 100644 --- a/.github/workflows/test_branch.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: - 'gh-pages' tags-ignore: - '*' + pull_request: jobs: test-branch: @@ -40,7 +41,12 @@ jobs: - name: Validate User Code run: | npm run validate-user-code + - name: Run OS tests + if: ${{ github.event_name == 'pull_request' }} + run: | + npm run coverage - name: Run Enterprise tests + if: ${{ github.event_name == 'push' }} env: HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} run: | diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml deleted file mode 100644 index 21efbc9f4..000000000 --- a/.github/workflows/test_pr.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: PR Builder -on: pull_request - -jobs: - test-pr: - name: Test PR (${{matrix.os}}) - runs-on: ${{matrix.os}} - - strategy: - matrix: - os: [ ubuntu-latest, windows-latest ] - - steps: - - name: Setup Java - uses: actions/setup-java@v1 - with: - java-version: 8 - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 10 - - name: Disable line ending conversion of git - if: ${{ matrix.os == 'windows-latest'}} - run: | - git config --global core.autocrlf false - - name: Checkout code - uses: actions/checkout@v2 - - name: Install dependencies and compile client - run: | - npm install - npm run compile - - name: Lint - run: | - npm run lint - - name: Validate User Code - run: | - npm run validate-user-code - - name: Run OS tests - run: | - npm run coverage From 9ccc6eb8febb80c2817c1569ef30c154a3b7cccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serkan=20=C3=96zel?= Date: Thu, 5 Aug 2021 13:43:15 +0300 Subject: [PATCH 7/7] Address comment --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 320799de2..03a150206 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Test Branch +name: Run tests on: push: branches-ignore: @@ -8,8 +8,8 @@ on: pull_request: jobs: - test-branch: - name: Test Branch (${{ matrix.os }}) + run-tests: + name: Run Tests on (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: