Skip to content

Commit

Permalink
build: add run order and dependancies in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MrJithil committed Nov 4, 2023
1 parent 94156e3 commit a65cae5
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ permissions:

jobs:
build-tarball:
needs:
- lint-addon-docs
- lint-cpp
- lint-js-and-md
- lint-py
- lint-yaml
- lint-sh
- lint-codeowners
- lint-pr-url

if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ permissions:

jobs:
build-windows:
needs:
- lint-addon-docs
- lint-cpp
- lint-js-and-md
- lint-py
- lint-yaml
- lint-sh
- lint-codeowners
- lint-pr-url

if: github.event.pull_request.draft == false
strategy:
matrix:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/coverage-linux-without-intl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ permissions:

jobs:
coverage-linux-without-intl:
needs:
- lint-addon-docs
- lint-cpp
- format-cpp
- lint-js-and-md
- lint-py
- lint-yaml
- lint-sh
- lint-codeowners
- lint-pr-url
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ permissions:

jobs:
coverage-linux:
needs:
- lint-addon-docs
- lint-cpp
- format-cpp
- lint-js-and-md
- lint-py
- lint-yaml
- lint-sh
- lint-codeowners
- lint-pr-url
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/coverage-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ permissions:

jobs:
coverage-windows:
needs:
- lint-addon-docs
- lint-cpp
- format-cpp
- lint-js-and-md
- lint-py
- lint-yaml
- lint-sh
- lint-codeowners
- lint-pr-url
- build-windows

if: github.event.pull_request.draft == false
runs-on: windows-2022
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ permissions:

jobs:
build-docs:
needs:
- build-tarball

if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ permissions:

jobs:
lint-addon-docs:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -37,6 +38,7 @@ jobs:
- name: Lint addon docs
run: NODE=$(command -v node) make lint-addon-docs
lint-cpp:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -52,6 +54,9 @@ jobs:
- name: Lint C/C++ files
run: make lint-cpp
format-cpp:
needs:
- lint-commit-message
- lint-cpp
if: ${{ github.event.pull_request && github.event.pull_request.draft == false && github.base_ref == github.event.repository.default_branch }}
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -90,6 +95,7 @@ jobs:
exit "$EXIT_CODE"
fi
lint-js-and-md:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -115,6 +121,7 @@ jobs:
env:
NODE_RELEASED_VERSIONS: ${{ steps.get-released-versions.outputs.NODE_RELEASED_VERSIONS }}
lint-py:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -132,6 +139,7 @@ jobs:
make lint-py-build
make lint-py
lint-yaml:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -150,6 +158,7 @@ jobs:
make lint-yaml
lint-sh:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -160,6 +169,7 @@ jobs:
- name: Lint Shell scripts
run: tools/lint-sh.mjs .
lint-codeowners:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -170,6 +180,7 @@ jobs:
with:
checks: files,duppatterns
lint-pr-url:
needs: lint-commit-message
if: ${{ github.event.pull_request }}
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ permissions:

jobs:
test-asan:
needs: build-tarball
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-internet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ permissions:

jobs:
test-internet:
needs: build-tarball
if: github.repository == 'nodejs/node' || github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ permissions:

jobs:
test-linux:
needs: build-tarball
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ permissions:

jobs:
test-macOS:
needs: build-tarball
if: github.event.pull_request.draft == false
runs-on: macos-latest
steps:
Expand Down

0 comments on commit a65cae5

Please sign in to comment.