feat: adding admin service to workflow

This commit is contained in:
sriram veeraghanta 2024-05-09 00:53:47 +05:30
parent 59335618b4
commit 230fd961c7

View File

@ -10,8 +10,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
apiserver_changed: ${{ steps.changed-files.outputs.apiserver_any_changed }} 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 }} web_changed: ${{ steps.changed-files.outputs.web_any_changed }}
space_changed: ${{ steps.changed-files.outputs.deploy_any_changed }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Get changed files - name: Get changed files
@ -21,20 +22,27 @@ jobs:
files_yaml: | files_yaml: |
apiserver: apiserver:
- apiserver/** - apiserver/**
web: admin:
- web/** - admin/**
- packages/** - packages/**
- 'package.json' - 'package.json'
- 'yarn.lock' - 'yarn.lock'
- 'tsconfig.json' - 'tsconfig.json'
- 'turbo.json' - 'turbo.json'
deploy: space:
- space/** - space/**
- packages/** - packages/**
- 'package.json' - 'package.json'
- 'yarn.lock' - 'yarn.lock'
- 'tsconfig.json' - 'tsconfig.json'
- 'turbo.json' - 'turbo.json'
web:
- web/**
- packages/**
- 'package.json'
- 'yarn.lock'
- 'tsconfig.json'
- 'turbo.json'
lint-apiserver: lint-apiserver:
needs: get-changed-files needs: get-changed-files
@ -45,7 +53,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: '3.x' # Specify the Python version you need python-version: "3.x" # Specify the Python version you need
- name: Install Pylint - name: Install Pylint
run: python -m pip install ruff run: python -m pip install ruff
- name: Install Apiserver Dependencies - name: Install Apiserver Dependencies
@ -53,9 +61,9 @@ jobs:
- name: Lint apiserver - name: Lint apiserver
run: ruff check --fix apiserver run: ruff check --fix apiserver
lint-web: lint-admin:
needs: get-changed-files 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 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -64,7 +72,7 @@ jobs:
with: with:
node-version: 18.x node-version: 18.x
- run: yarn install - run: yarn install
- run: yarn lint --filter=web - run: yarn lint --filter=admin
lint-space: lint-space:
needs: get-changed-files needs: get-changed-files
@ -79,8 +87,9 @@ jobs:
- run: yarn install - run: yarn install
- run: yarn lint --filter=space - run: yarn lint --filter=space
build-web: lint-web:
needs: lint-web needs: get-changed-files
if: needs.get-changed-files.outputs.web_changed == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -89,7 +98,19 @@ jobs:
with: with:
node-version: 18.x node-version: 18.x
- run: yarn install - 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: build-space:
needs: lint-space needs: lint-space
@ -102,3 +123,15 @@ jobs:
node-version: 18.x node-version: 18.x
- run: yarn install - run: yarn install
- run: yarn build --filter=space - 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