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
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