Skip to content

Commit

Permalink
refactored workflow into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
Koufan-De-King committed Nov 26, 2024
1 parent fad64e0 commit 5a9adea
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 65 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build

on:
workflow_run:
workflows: Install Dependencies
types:
- completed

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cached node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ github.sha }}
- name: Build
run: npm run build
20 changes: 20 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Install Dependencies

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: npm ci
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ github.sha }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Lint Analyses
name: Lint

on:
workflow_call:
workflow_run:
workflows: Install Dependencies
types:
- completed

jobs:
lint:
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/main-workflow.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Prettier Analyses
name: Prettier

on:
workflow_call:
workflow_run:
workflows: Install Dependencies
types:
- completed

jobs:
prettier:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: SonarQube Analyses
name: SonarQube Analysis

on:
workflow_call:
workflow_run:
workflows: Unit Tests
types:
- completed

jobs:
sonarqube:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Unit Tests Analyses
name: Unit Tests

on:
workflow_call:
workflow_run:
workflows: Install Dependencies
types:
- completed

jobs:
unit_tests:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: TypeScript Analyses
name: TypeScript

on:
workflow_call:
workflow_run:
workflows: Install Dependencies
types:
- completed

jobs:
typescript:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
[![Main Workflow](https://github.com/ADORSYS-GIS/webank-UserApp/actions/workflows/main-workflow.yml/badge.svg)](https://github.com/ADORSYS-GIS/webank-UserApp/actions/workflows/main-workflow.yml)

# Webank UserApp

0 comments on commit 5a9adea

Please sign in to comment.