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 diff --git a/.github/workflows/CI-pipeline.yml b/.github/workflows/CI-pipeline.yml new file mode 100644 index 0000000..cf9eb17 --- /dev/null +++ b/.github/workflows/CI-pipeline.yml @@ -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 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 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": [