diff --git a/.github/workflows/nodejs.condo.ci.yml b/.github/workflows/nodejs.condo.ci.yml index dc8d8ab1320..14fdf66dec9 100644 --- a/.github/workflows/nodejs.condo.ci.yml +++ b/.github/workflows/nodejs.condo.ci.yml @@ -22,7 +22,7 @@ concurrency: env: DOCKER_IMAGE: condo/condo-image:${{ github.event.pull_request.head.sha || github.sha }} DOCKER_IMAGE_FULL: ${{ secrets.DOCKER_REGISTRY }}/condo/condo-image:${{ github.event.pull_request.head.sha || github.sha }} - PG_IMAGE_FULL: ${{ secrets.DOCKER_REGISTRY }}/doma/utils/postgres:13.2 + PG_IMAGE_FULL: ${{ secrets.DOCKER_REGISTRY }}/doma/utils/postgres:16.4 REDIS_IMAGE_FULL: ${{ secrets.DOCKER_REGISTRY }}/doma/utils/redis:6.2 REF: ${{ github.event.pull_request.head.sha || github.ref }} @@ -119,8 +119,9 @@ jobs: runs-on: ubuntu-22.04 outputs: address-service: ${{ steps.detect-changes.outputs.address-service }} - dev-api: ${{ steps.detect-changes.outputs.dev-api }} condorb: ${{ steps.detect-changes.outputs.condorb }} + dev-api: ${{ steps.detect-changes.outputs.dev-api }} + open-condo: ${{ steps.detect-changes.outputs.open-condo }} registry: ${{ steps.detect-changes.outputs.registry }} webhooks: ${{ steps.detect-changes.outputs.webhooks }} steps: @@ -147,11 +148,16 @@ jobs: - 'apps/condo/domains/miniapp/**' - 'apps/condo/domains/user/**' - 'packages/**' - webhooks: - - 'packages/webhooks/**' + open-condo: + - 'packages/**' + - '**/*.md' + - '*' + - '!.helm/**' registry: - 'apps/registry/**' - 'packages/**' + webhooks: + - 'packages/webhooks/**' lint: name: Lint source code @@ -206,6 +212,68 @@ jobs: ref: ${{ env.REF }} - run: ./bin/run-semgrep.sh -a + open-condo-build: + name: Build open-source part + needs: + - authorize + - detect-changes + if: ${{ needs.detect-changes.outputs.open-condo == 'true' }} + strategy: + matrix: + os: [ ubuntu-22.04, windows-latest ] + node-version: [ 16.x ] + python-version: [ 3.13 ] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code without submodules + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: 'false' + ssh-key: ${{ secrets.SSH_DOCK_SERVER_PRIVATE_KEY }} + ref: ${{ env.REF }} + - name: Setup native Postgres (Windows Runner only) + if: matrix.os == 'windows-latest' + uses: ikalnytskyi/action-setup-postgres@v7 + with: + postgres-version: 16 + - name: Setup native Redis (Windows Runner only) + if: matrix.os == 'windows-latest' + run: | + choco install redis --version 6.2.17 -y + redis-server --daemonize yes + - name: Setup databases (Linux Runners) + if: matrix.os != 'windows-latest' + run: | + docker compose up -d postgresdb redis + - name: Prepare Python environment + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Prepare Node environment + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - name: Install packages + run: | + pip install Django psycopg2-binary + npm i -g turbo + yarn --no-immutable + - name: Build condo dependencies + run: | + yarn workspace @app/condo build:deps + - name: Prepare local condo environment + run: | + node bin/prepare.js -f condo + - name: Build condo itself + run: | + yarn workspace @app/condo build + - name: Start condo app + run: | + yarn workspace @app/condo start & node bin/wait-apps-apis.js -f condo + + run-address-service-tests: name: Address-Service Tests runs-on: ubuntu-22.04 diff --git a/packages/ui/bin/buildStyleVars/runner.js b/packages/ui/bin/buildStyleVars/runner.js index db1ea4e2b42..7c5552241a4 100644 --- a/packages/ui/bin/buildStyleVars/runner.js +++ b/packages/ui/bin/buildStyleVars/runner.js @@ -7,7 +7,7 @@ const StyleDictionaryLib = require('style-dictionary') const { allTransformers, webVarsTransformersChain } = require('./transformers') const TOKENS_DIR = path.join(__dirname, '../..', 'src/tokens') -const SOURCE_PATH = path.join(TOKENS_DIR, 'sets/*.json') +const SOURCE_PATH = 'src/tokens/sets/*.json' // Less is used for development, CSS is used for strict token values check // Can be expanded with SCSS if someday we will decide to give tokens out // It's also possible to generate mobile tokens for iOS and Android here diff --git a/packages/ui/package.json b/packages/ui/package.json index 38e85c8be98..7d84631de9a 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -29,8 +29,8 @@ ], "scripts": { "build:deps": "turbo build --filter=@open-condo/ui^...", - "build:styles": "find src/tokens -mindepth 1 -not -name 'tokens.json' -delete && node bin/prepare-tokens.js && node bin/buildStyleVars/runner.js --web less css", - "build:colors": "find src/colors -mindepth 1 -not -name 'index.ts' -delete && node bin/generate-colors.js", + "build:styles": "rimraf -g 'src/tokens/!(tokens.json)' && node bin/prepare-tokens.js && node bin/buildStyleVars/runner.js --web less css", + "build:colors": "rimraf -g 'src/colors/!(index.ts)' && node bin/generate-colors.js", "build:tokens": "yarn build:styles && yarn build:colors", "build:lib": "webpack --config webpack.prod.js && tsc --project tsconfig.prod.json", "build": "yarn build:tokens && yarn build:lib", @@ -107,6 +107,7 @@ "quicktype-core": "^6.0.71", "react": "^16.13.1", "react-dom": "^16.13.1", + "rimraf": "^6.0.1", "source-map-loader": "^4.0.1", "storybook": "7.6.20", "style-dictionary": "^3.9.2", diff --git a/yarn.lock b/yarn.lock index 76c4cb54ac8..54511d20668 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14243,6 +14243,7 @@ __metadata: react-markdown: ^6 react-phone-input-2: ^2.15.1 remark-gfm: ^1 + rimraf: ^6.0.1 source-map-loader: ^4.0.1 storybook: 7.6.20 style-dictionary: ^3.9.2