Skip to content

Commit

Permalink
ci: use gitsubmodule
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Sep 20, 2023
1 parent a05d2a1 commit cc19636
Show file tree
Hide file tree
Showing 98 changed files with 2,122 additions and 2,109 deletions.
4 changes: 0 additions & 4 deletions .browserslistrc

This file was deleted.

File renamed without changes.
2 changes: 2 additions & 0 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
pull-requests: write
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]
if: env.TAIGA_FAMILY_BOT_IS_AUTHOR == 'true'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]

- name: Auto assign
if: env.IS_OWNER_MODE == 'true'
uses: toshimaru/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/auto-cleanup-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
if: github.event_name == 'push'
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/auto-dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
2 changes: 2 additions & 0 deletions .github/workflows/auto-remove-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
6 changes: 3 additions & 3 deletions .github/workflows/build-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]

- name: Build demo
run: npm run build
- run: npm run build

concurrency:
group: build-demo-${{ github.head_ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
name: Build libs
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]

- name: Build library
run: npx nx build tui-editor
- run: npx nx build tui-editor

concurrency:
group: build-${{ github.head_ref }}
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]

- run: npx nx build demo

- name: Debug output
run: tree dist/demo/browser -P '*.html'

- run: npx nx build editor-demo
- name: Deploy preview
uses: FirebaseExtended/action-hosting-deploy@v0
continue-on-error: true
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]

- name: Build demo for Github Pages
run: npx nx build-gh-pages demo

- run: npx nx build-gh-pages demo
- uses: taiga-family/ci/actions/[email protected]
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]
continue-on-error: true
- uses: taiga-family/ci/actions/[email protected]

- name: Building demo-app of git-branch without cache
run: npx nx build demo --output-path ${{ env.DIST }}
run: npx nx build editor-demo --output-path ${{ env.DIST }}

- name: Upload cache / ${{ env.CACHE_DIST_KEY }}
uses: actions/cache/[email protected]
Expand All @@ -31,6 +33,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]

Expand All @@ -44,7 +48,7 @@ jobs:
run: npx nx serve-compiled demo --path ${{ env.DIST }} --port ${{ env.NG_SERVER_PORT }}

- name: Run screenshot tests on ${{ env.DIST }}
run: npx nx e2e demo-cypress
run: npx nx e2e editor-demo-cypress

- name: Clean up resources
run: npx kill-port --port ${{ env.NG_SERVER_PORT }}
Expand All @@ -61,7 +65,7 @@ jobs:

- name: Run screenshot tests on ${{ env.DIST_NEXT }}
continue-on-error: true
run: npx nx e2e demo-cypress
run: npx nx e2e editor-demo-cypress

- name: Clean up resources
run: npx kill-port --port ${{ env.NG_SERVER_PORT }}
Expand All @@ -81,6 +85,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]

- name: Download artifacts / ${{ env.SNAPSHOTS_CACHE_KEY }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
steps:
- uses: actions/[email protected]
with:
submodules: recursive
fetch-depth: 0
persist-credentials: false
ref: ${{ github.head_ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]

- run: npx nx build demo
- run: tree ${{ env.DIST }} -P '*.html'
- run: npx nx build editor-demo
- name: Publish snapshots
uses: s0/[email protected]
env:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]

- name: Run tests
run: npx nx test tui-editor

- run: npx nx test tui-editor
- uses: codecov/[email protected]
with:
directory: ./coverage/tui-editor
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "taiga-ui"]
path = taiga-ui
url = [email protected]:taiga-family/taiga-ui.git
branch = main
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/dist/**
**/coverage/**
package-lock.json
taiga-ui/**
.husky
2 changes: 1 addition & 1 deletion apps/demo-cypress/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "demo-cypress",
"name": "editor-demo-cypress",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/demo-cypress/cypress",
"projectType": "application",
Expand Down
32 changes: 24 additions & 8 deletions apps/demo/project.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"name": "demo",
"name": "editor-demo",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/demo/src",
"prefix": "app",
"targets": {
"prebuild": {
"executor": "nx:run-commands",
"options": {
"command": "cd taiga-ui && npx nx build i18n --output-style=stream"
}
},
"build": {
"executor": "@angular-builders/custom-webpack:browser",
"options": {
Expand All @@ -25,14 +31,17 @@
},
{
"glob": "**/*",
"input": "node_modules/@taiga-ui/icons/src",
"input": "taiga-ui/projects/icons/src",
"output": "assets/taiga-ui/icons"
}
],
"stylePreprocessorOptions": {
"includePaths": ["taiga-ui/projects/core/styles", "taiga-ui/projects/styles"]
},
"styles": [
"node_modules/@taiga-ui/core/styles/taiga-ui-theme.less",
"node_modules/@taiga-ui/core/styles/taiga-ui-fonts.less",
"node_modules/@taiga-ui/styles/taiga-ui-global.less",
"taiga-ui/projects/core/styles/taiga-ui-theme.less",
"taiga-ui/projects/core/styles/taiga-ui-fonts.less",
"taiga-ui/projects/styles/taiga-ui-global.less",
"apps/demo/src/styles.less"
],
"scripts": [
Expand Down Expand Up @@ -69,7 +78,14 @@
},
"development": {}
},
"defaultConfiguration": "production"
"defaultConfiguration": "production",
"dependsOn": [
{
"projects": "self",
"target": "prebuild",
"params": "ignore"
}
]
},
"build-gh-pages": {
"executor": "nx:run-commands",
Expand All @@ -94,10 +110,10 @@
},
"configurations": {
"production": {
"browserTarget": "demo:build:production"
"browserTarget": "editor-demo:build:production"
},
"development": {
"browserTarget": "demo:build:development"
"browserTarget": "editor-demo:build:development"
}
},
"defaultConfiguration": "development"
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/app/app.browser.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ import {TuiLogoModule} from './modules/logo/logo.module';

return `${link}/${context.package.toLowerCase()}/src/lib/tui-editor/${(
context.header[0].toLowerCase() + context.header.slice(1)
).replace(/[A-Z]/g, m => `-${m.toLowerCase()}`)}`;
).replace(/[A-Z]/g, (m: string) => `-${m.toLowerCase()}`)}`;
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/app/app.style.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@taiga-ui/core/styles/taiga-ui-local.less';
@import 'taiga-ui-local.less';

:host {
font: var(--tui-font-text-m);
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/app/pages/color-picker/examples/4/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@taiga-ui/core/styles/taiga-ui-local.less';
@import 'taiga-ui-local.less';

input {
.fullsize();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@taiga-ui/core/styles/taiga-ui-local.less';
@import 'taiga-ui-local.less';

.tool-button {
.transition(background);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@taiga-ui/core/styles/taiga-ui-local.less';
@import 'taiga-ui-local.less';

.tool-button {
.transition(background);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@taiga-ui/core/styles/taiga-ui-local.less';
@import 'taiga-ui-local.less';

.tool-button {
.transition(background);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@taiga-ui/core/styles/taiga-ui-local.less';
@import 'taiga-ui-local.less';

.tool-button {
.transition(background);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@taiga-ui/core/styles/taiga-ui-local.less';
@import 'taiga-ui-local.less';

.loader {
.fullsize(fixed);
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/styles.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@taiga-ui/styles/taiga-ui-global';
@import 'taiga-ui-global';
@import '~highlight.js/styles/github.css';

body {
Expand Down
5 changes: 3 additions & 2 deletions apps/demo/webpack.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {GLOBAL_DEFS_FOR_TERSER_WITH_AOT} from '@angular/compiler-cli';
import {tuiIsObject} from '@taiga-ui/cdk';
import TerserPlugin from 'terser-webpack-plugin';
import {Configuration} from 'webpack';
import {merge} from 'webpack-merge';
Expand Down Expand Up @@ -105,7 +104,9 @@ const config: Configuration = {
export default (ngConfigs: Configuration): Configuration => {
const ngRules = [...(ngConfigs.module?.rules || [])].map(rule => {
if (
tuiIsObject(rule) &&
// eslint-disable-next-line @taiga-ui/experience/no-typeof
typeof rule === `object` &&
!!rule &&
DO_NOT_MUTATE_RAW_FILE_CONTENTS.some(
pattern => rule.test instanceof RegExp && rule.test?.test(pattern),
)
Expand Down
5 changes: 1 addition & 4 deletions libs/tui-editor/abstract/ng-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"lib": {
"entryFile": "index.ts",
"styleIncludePaths": [
"../../../core/styles"
]
"entryFile": "index.ts"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@taiga-ui/core/styles/taiga-ui-local.less';
@import 'taiga-ui-local.less';

:host {
.createStackingContext();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@taiga-ui/core/styles/taiga-ui-local.less';
@import 'taiga-ui-local.less';

:host {
.createStackingContext();
Expand Down
Loading

0 comments on commit cc19636

Please sign in to comment.