diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 38f557da7..000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,35 +0,0 @@ -## PR Checklist - -Please check if your PR fulfills the following requirements: - -- [ ] The commit message follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) -- [ ] Tests for the changes have been added (for bug fixes / features) -- [ ] Docs have been added / updated (for bug fixes / features) - -## PR Type - -What kind of change does this PR introduce? - - - -- [ ] Bugfix -- [ ] Feature -- [ ] Refactoring (no functional changes, no api changes) -- [ ] Other... Please describe: - -## What is the current behavior? - - - -Issue Number: N/A - -## What is the new behavior? - -## Does this PR introduce a breaking change? - -- [ ] Yes -- [ ] No - - - -## Other information diff --git a/.github/actions/nodejs/action.yml b/.github/actions/nodejs/action.yml deleted file mode 100644 index 13e1dbcff..000000000 --- a/.github/actions/nodejs/action.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Action for Node.js -description: Node.js setup cache - -inputs: - node-version: - description: Node.js version - required: false - default: 18.15 - -outputs: - root-package-version: - description: Full version of root package.json (x.y.z) - value: ${{ steps.output.outputs.root-package-version }} - root-package-major-version: - description: Only major version of root package.json (x) - value: ${{ steps.output.outputs.root-package-major-version }} - is-release-candidate: - description: root package.json includes -rc - value: ${{ steps.output.outputs.is-release-candidate }} - -runs: - using: composite - steps: - - name: Additional logs for improving debug of environments - shell: bash - run: | - echo "github.workflow: ${{ github.workflow }}" - echo "github.sha: ${{ github.sha }}" - echo "github.ref: ${{ github.ref }}" - echo "github.ref_name: ${{ github.ref_name }}" - echo "github.ref_type: ${{ github.ref_type }}" - echo "github.base_ref: ${{ github.base_ref }}" - echo "github.head_ref: ${{ github.head_ref }}" - echo "github.run_id: ${{ github.run_id }}" - echo "github.run_number: ${{ github.run_number }}" - echo "github.run_attempt: ${{ github.run_attempt }}" - echo "github.event.number: ${{ github.event.number }}" - echo "github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref }}" - echo "github.event.pull_request.head.repo.full_name: ${{ github.event.pull_request.head.repo.full_name }}" - - - name: Use Node.js ${{ inputs.node-version }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ inputs.node-version }} - registry-url: 'https://registry.npmjs.org' - - - name: Restore node_modules from cache - id: cache-node-modules - uses: actions/cache@v3.3.1 - with: - path: | - **/node_modules/ - !**/node_modules/.cache - key: modules-cache__nodejs-${{ inputs.node-version }}__${{ hashFiles('**/package-lock.json') }} - - - name: Restore from global NPM cache - if: steps.cache-node-modules.outputs.cache-hit != 'true' - uses: actions/cache@v3.3.1 - with: - path: ~/.npm - key: npm-cache__nodejs-${{ inputs.node-version }}__${{ hashFiles('**/package-lock.json') }} - restore-keys: npm-cache-hash__ - - - shell: bash - run: | - echo "Show environment Node.js, npm ..." - node -v - npm -v - - - shell: bash - run: | - echo "Provide global variables ..." - echo "NPM_CONFIG_CACHE=~/.npm" >> $GITHUB_ENV - echo "NX_BRANCH=${{ github.event.number }}" >> $GITHUB_ENV - echo "IS_FORK=${{ github.event.pull_request.head.repo.full_name != github.repository }}" >> $GITHUB_ENV - echo "IS_DEPENDABOT=${{ github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' }}" >> $GITHUB_ENV - echo "IS_MAIN_BRANCH=${{ github.ref == 'refs/heads/main' }}" >> $GITHUB_ENV - - - name: Clean install dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm ci - shell: bash diff --git a/.github/workflows/auto-add-to-project.yml b/.github/workflows/auto-add-to-project.yml index 3900fa0fb..8ca8b4888 100644 --- a/.github/workflows/auto-add-to-project.yml +++ b/.github/workflows/auto-add-to-project.yml @@ -7,6 +7,6 @@ jobs: automate-project-columns: runs-on: ubuntu-latest steps: - - uses: taiga-family/ci/actions/setup-project@1.13.0 + - uses: taiga-family/ci/actions/setup/project@1.20.0 with: token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} diff --git a/.github/workflows/build-demo.yml b/.github/workflows/build-demo.yml index 9467d83e6..a2846dcbd 100644 --- a/.github/workflows/build-demo.yml +++ b/.github/workflows/build-demo.yml @@ -11,11 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - name: Setup Node.js and Cache - uses: ./.github/actions/nodejs - + - uses: taiga-family/ci/actions/setup/node@1.20.0 - run: npx nx build demo concurrency: diff --git a/.github/workflows/build-prerender.yml b/.github/workflows/build-prerender.yml index 9d6beb2f3..1986d66a2 100644 --- a/.github/workflows/build-prerender.yml +++ b/.github/workflows/build-prerender.yml @@ -8,13 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - name: Setup Node.js and Cache - uses: ./.github/actions/nodejs - - - name: Build demo by prerender - run: npx nx build-gh-pages demo + - uses: taiga-family/ci/actions/setup/node@1.20.0 + - run: npx nx build-gh-pages demo concurrency: group: build-prerender-${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98e5889b6..1816ec6ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,11 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - name: Setup Node.js and Cache - uses: ./.github/actions/nodejs - + - uses: taiga-family/ci/actions/setup/node@1.20.0 - run: npm run run-many:build:libs concurrency: diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index de0f02e82..4307c9556 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -12,19 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - name: Setup Node.js and Cache - uses: ./.github/actions/nodejs - + - uses: taiga-family/ci/actions/setup/node@1.20.0 - run: npx nx build demo - name: Debug output run: tree dist/demo -P '*.html' - - name: Deploy preview - - uses: FirebaseExtended/action-hosting-deploy@v0 + - uses: FirebaseExtended/action-hosting-deploy@v0 continue-on-error: true if: ${{ env.IS_FORK == 'false' && env.IS_DEPENDABOT == 'false' }} with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5b71affb1..9f398c030 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,14 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - name: Setup Node.js and Cache - uses: ./.github/actions/nodejs - - - name: Build demo by prerender - run: npx nx build-gh-pages demo - + - uses: taiga-family/ci/actions/setup/node@1.20.0 + - run: npx nx build-gh-pages demo - name: Deploy uses: JamesIves/github-pages-deploy-action@v4.4.1 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 45aafaee3..766cdef58 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,15 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - name: Setup Node.js and Cache - uses: ./.github/actions/nodejs - - - run: | - npm run prettier -- --check - npm run typecheck - npm run lint + - uses: taiga-family/ci/actions/setup/node@1.20.0 + - run: npm run prettier -- --check + - run: npm run typecheck + - run: npm run lint concurrency: group: lint-${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41d8d2ddd..88f201c89 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,17 +31,13 @@ jobs: ref: ${{ github.head_ref }} token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} - - name: Setup Node.js and Cache - uses: ./.github/actions/nodejs - - - name: Setup GIT username and NPM token - run: | - git config --global user.name "taiga-family-bot" - git config --global user.email "opensource@tinkoff.ru" - git config remote.origin.url https://x-access-token:${{ secrets.TAIGA_FAMILY_BOT_PAT }}@github.com/$GITHUB_REPOSITORY - npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" - NPM_WHOAMI_OUTPUT=$(npm whoami) - echo "::debug::npm whoami: ${NPM_WHOAMI_OUTPUT}" + - uses: taiga-family/ci/actions/setup/node@1.20.0 + - uses: taiga-family/ci/actions/setup/config/git@1.20.0 + with: + token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} + - uses: taiga-family/ci/actions/setup/config/npm@1.20.0 + with: + token: ${{ secrets.NPM_TOKEN }} - name: Lerna update version of packages if: always() @@ -52,12 +48,10 @@ jobs: npx lerna version --no-private fi - - name: Build libraries - run: npx nx run-many --target=build --parallel=1 --output-style=stream --exclude=demo + - run: npx nx run-many --target=build --parallel=1 --output-style=stream --exclude=demo - - name: Publish + - run: npx nx run-many --target=publish --parallel=1 --output-style=stream if: always() - run: npx nx run-many --target=publish --parallel=1 --output-style=stream concurrency: group: release-${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3da3a5ec9..d09031dd5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,16 +32,9 @@ jobs: name: ${{ matrix.project }} steps: - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - name: Setup Node.js and Cache - uses: ./.github/actions/nodejs - - - name: Run tests for ${{ matrix.project }} - run: npx nx test ${{ matrix.project }} - - - name: Archive coverage artifacts - uses: actions/upload-artifact@v3.1.2 + - uses: taiga-family/ci/actions/setup/node@1.20.0 + - run: npx nx test ${{ matrix.project }} + - uses: actions/upload-artifact@v3.1.2 with: name: coverage-${{ github.workflow }}-${{ github.run_id }} path: coverage