Skip to content

Commit

Permalink
Trigger the required actions from a single workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsDrike committed May 23, 2024
1 parent b2f1f10 commit 7edf93c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: CI

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

# Cancel already running workflows if new ones are scheduled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
validation:
uses: ./.github/workflows/validation.yml

unit-tests:
uses: ./.github/workflows/unit-tests.yml
12 changes: 1 addition & 11 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
name: Unit-Tests

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

# Cancel already running workflows if new ones are scheduled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: workflow_call

jobs:
unit-tests:
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
name: Validation

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: workflow_call

env:
PRE_COMMIT_HOME: "/home/runner/.cache/pre-commit"
Expand Down

0 comments on commit 7edf93c

Please sign in to comment.