From 230fd961c7e25d244c8d46d5a2a2ad637e7db1e7 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Thu, 9 May 2024 00:53:47 +0530 Subject: [PATCH] feat: adding admin service to workflow --- .github/workflows/build-test-pull-request.yml | 55 +++++++++++++++---- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-test-pull-request.yml b/.github/workflows/build-test-pull-request.yml index e0014f696..218817221 100644 --- a/.github/workflows/build-test-pull-request.yml +++ b/.github/workflows/build-test-pull-request.yml @@ -10,8 +10,9 @@ jobs: runs-on: ubuntu-latest outputs: apiserver_changed: ${{ steps.changed-files.outputs.apiserver_any_changed }} + admin_changed: ${{ steps.changed-files.outputs.admin_any_changed }} + space_changed: ${{ steps.changed-files.outputs.space_any_changed }} web_changed: ${{ steps.changed-files.outputs.web_any_changed }} - space_changed: ${{ steps.changed-files.outputs.deploy_any_changed }} steps: - uses: actions/checkout@v3 - name: Get changed files @@ -21,20 +22,27 @@ jobs: files_yaml: | apiserver: - apiserver/** - web: - - web/** + admin: + - admin/** - packages/** - 'package.json' - 'yarn.lock' - 'tsconfig.json' - 'turbo.json' - deploy: + space: - space/** - packages/** - 'package.json' - 'yarn.lock' - 'tsconfig.json' - 'turbo.json' + web: + - web/** + - packages/** + - 'package.json' + - 'yarn.lock' + - 'tsconfig.json' + - 'turbo.json' lint-apiserver: needs: get-changed-files @@ -45,7 +53,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.x' # Specify the Python version you need + python-version: "3.x" # Specify the Python version you need - name: Install Pylint run: python -m pip install ruff - name: Install Apiserver Dependencies @@ -53,9 +61,9 @@ jobs: - name: Lint apiserver run: ruff check --fix apiserver - lint-web: + lint-admin: needs: get-changed-files - if: needs.get-changed-files.outputs.web_changed == 'true' + if: needs.get-changed-files.outputs.admin_changed == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -64,7 +72,7 @@ jobs: with: node-version: 18.x - run: yarn install - - run: yarn lint --filter=web + - run: yarn lint --filter=admin lint-space: needs: get-changed-files @@ -79,8 +87,9 @@ jobs: - run: yarn install - run: yarn lint --filter=space - build-web: - needs: lint-web + lint-web: + needs: get-changed-files + if: needs.get-changed-files.outputs.web_changed == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -89,7 +98,19 @@ jobs: with: node-version: 18.x - run: yarn install - - run: yarn build --filter=web + - run: yarn lint --filter=web + + build-admin: + needs: lint-space + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 18.x + - run: yarn install + - run: yarn build --filter=admin build-space: needs: lint-space @@ -102,3 +123,15 @@ jobs: node-version: 18.x - run: yarn install - run: yarn build --filter=space + + build-web: + needs: lint-web + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 18.x + - run: yarn install + - run: yarn build --filter=web