From 142e22d42c0f69500f3ed2f5e7eeb2d65b0dcfaf Mon Sep 17 00:00:00 2001 From: Ilya Hancharyk Date: Tue, 12 Sep 2023 17:59:19 +0300 Subject: [PATCH 1/4] EPMRPP-85309 || Add CI pipeline --- .github/workflows/CI-pipeline.yml | 30 ++++++++++++++++++++++++++++++ package.json | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/CI-pipeline.yml diff --git a/.github/workflows/CI-pipeline.yml b/.github/workflows/CI-pipeline.yml new file mode 100644 index 0000000..980b861 --- /dev/null +++ b/.github/workflows/CI-pipeline.yml @@ -0,0 +1,30 @@ +name: CI-pipeline + +on: + push: + branches: + - develop + - '!main' + paths-ignore: + - README.md + - CHANGELOG.md + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install of node dependencies + run: npm install + - name: Build the source code + run: npm run build + - name: Run lint + run: npm run lint + - name: Run tests and check coverage + run: npm run test:coverage diff --git a/package.json b/package.json index 069d855..0f5ffec 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,8 @@ "build:storybook": "storybook build", "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"", "format": "npm run lint -- --fix", + "test": "exit 0", + "test:coverage": "exit 0", "prepare": "husky install" }, "files": [ From 961cba9e2d436c100a31aa2fb45c52fd4add49cf Mon Sep 17 00:00:00 2001 From: Ilya Hancharyk Date: Thu, 14 Sep 2023 20:11:19 +0300 Subject: [PATCH 2/4] EPMRPP-85309 || Add alpha version publish workflow --- .github/workflows/CI-pipeline.yml | 4 +-- .github/workflows/publish-dev.yml | 49 +++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish-dev.yml diff --git a/.github/workflows/CI-pipeline.yml b/.github/workflows/CI-pipeline.yml index 980b861..09dabf6 100644 --- a/.github/workflows/CI-pipeline.yml +++ b/.github/workflows/CI-pipeline.yml @@ -20,8 +20,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18 - - name: Install of node dependencies - run: npm install + - name: Install dependencies + run: npm ci - name: Build the source code run: npm run build - name: Run lint diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml new file mode 100644 index 0000000..66a8031 --- /dev/null +++ b/.github/workflows/publish-dev.yml @@ -0,0 +1,49 @@ +name: Publish dev package version + +on: +# TODO: enable auto-publishing once all quality gates are set +# push: +# branches: +# - develop + workflow_dispatch: + +jobs: + publish_dev: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Setup git credentials + run: | + git config --global user.email "support@reportportal.io" + git config --global user.name "reportportal.io" + git remote set-url origin https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + + - name: Bump version - prerelease + run: npm version prerelease --preid=alpha + + - name: Publish to NPM + run: | + npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN + npm config list + npm publish --access public --tag alpha + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} + + - name: Push version update back to repository + run: | + git push origin HEAD:${{ github.ref }} --tags From 59871640d5fdf7933212820018fb33ef796d9c34 Mon Sep 17 00:00:00 2001 From: Ilya Hancharyk Date: Thu, 14 Sep 2023 23:50:33 +0300 Subject: [PATCH 3/4] Update CODEOWNERS --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 74f7d18..aabbacd 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @AmsterGet @Bam6ycha @Vadim73i +* @AmsterGet @Bam6ycha @Vadim73i @dmitrysurdin From bd737838c1ed726213778f34b624d4e54adcb4b3 Mon Sep 17 00:00:00 2001 From: Ilya Hancharyk Date: Fri, 15 Sep 2023 00:03:26 +0300 Subject: [PATCH 4/4] EPMRPP-85309 || Add empty lines to workflow files --- .github/workflows/CI-pipeline.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI-pipeline.yml b/.github/workflows/CI-pipeline.yml index 09dabf6..cf9eb17 100644 --- a/.github/workflows/CI-pipeline.yml +++ b/.github/workflows/CI-pipeline.yml @@ -13,18 +13,24 @@ on: jobs: build: runs-on: ubuntu-latest + steps: - name: Checkout repository uses: actions/checkout@v3 + - name: Set up Node.js uses: actions/setup-node@v3 with: node-version: 18 + - name: Install dependencies run: npm ci - - name: Build the source code + + - name: Build run: npm run build + - name: Run lint run: npm run lint + - name: Run tests and check coverage run: npm run test:coverage