-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6267c1d
commit cfe6f79
Showing
3 changed files
with
33 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,42 +12,18 @@ on: | |
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: super-linter/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TYPESCRIPT_DEFAULT_STYLE: prettier | ||
VALIDATE_DOCKERFILE_HADOLINT: false | ||
VALIDATE_JSCPD: false | ||
VALIDATE_PYTHON_FLAKE8: false | ||
VALIDATE_PYTHON_MYPY: false | ||
uses: ./.github/workflows/lint.yml | ||
with: | ||
app_path: "./bot" | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: "npm" | ||
cache-dependency-path: bot/package-lock.json | ||
- name: Install Dependencies | ||
run: npm install --force | ||
working-directory: ./bot | ||
- name: Run Tests | ||
run: npm run test | ||
working-directory: ./bot | ||
- uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: npm run test:cov | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
app_path: "./bot" | ||
node_version: "20" | ||
cache_dependency_path: "./bot/package-lock.json" | ||
|
||
build-push: | ||
# needs: [lint, test] | ||
needs: [lint, test] | ||
uses: ./.github/workflows/build-push.yml | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
# .github/workflows/bot-ci.yml | ||
# .github/workflows/lint.yml | ||
|
||
name: Bot CI Pipeline | ||
name: Lint Workflow | ||
|
||
on: | ||
push: | ||
paths: | ||
- "bot/**" | ||
pull_request: | ||
paths: | ||
- "bot/**" | ||
workflow_call: | ||
inputs: | ||
app_path: | ||
description: 'Path to the application directory' | ||
required: true | ||
type: string | ||
linter_configs: | ||
description: 'Additional linter configurations' | ||
required: false | ||
type: mapping | ||
|
||
jobs: | ||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
with: | ||
app_path: "./bot" | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
test: | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
app_path: "./bot" | ||
node_version: "20" | ||
cache_dependency_path: "./bot/package-lock.json" | ||
|
||
build-push: | ||
needs: [lint, test] | ||
uses: ./.github/workflows/build-push.yml | ||
with: | ||
app_name: "bot" | ||
context: "./bot" | ||
dockerfile: "./bot/Dockerfile" | ||
- name: Run Linter | ||
uses: super-linter/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DEFAULT_WORKSPACE: ${{ github.workspace }}/${{ inputs.app_path }} | ||
TYPESCRIPT_DEFAULT_STYLE: prettier | ||
${{ toJson(inputs.linter_configs) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters