Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPMRPP-85309 || Add CI/CD pipelines for develop branch #7

Merged
merged 4 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @AmsterGet @Bam6ycha @Vadim73i
* @AmsterGet @Bam6ycha @Vadim73i @dmitrysurdin
36 changes: 36 additions & 0 deletions .github/workflows/CI-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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 dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run lint
run: npm run lint

- name: Run tests and check coverage
run: npm run test:coverage
49 changes: 49 additions & 0 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
Loading