Skip to content

Commit

Permalink
build: improve consistency between workflows
Browse files Browse the repository at this point in the history
PR-URL: #41791
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
Mesteery authored Feb 7, 2022
1 parent a066857 commit f7ff2ff
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/authors.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "authors update"
name: Authors update
on:
schedule:
# Run once a week at 00:05 AM UTC on Sunday.
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/auto-start-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
NODE_VERSION: lts/*

jobs:
get_prs_for_ci:
get-prs-for-ci:
if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest
outputs:
Expand All @@ -29,20 +29,20 @@ jobs:
--limit 100
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
startCI:
needs: get_prs_for_ci
if: needs.get_prs_for_ci.outputs.numbers != ''
start-ci:
needs: get-prs-for-ci
if: needs.get-prs-for-ci.outputs.numbers != ''
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false

# Install dependencies
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node-core-utils
run: npm install -g node-core-utils

Expand All @@ -55,6 +55,6 @@ jobs:
ncu-config set repo "$(echo ${{ github.repository }} | cut -d/ -f2)"
- name: Start the CI
run: ./tools/actions/start-ci.sh ${{ needs.get_prs_for_ci.outputs.numbers }}
run: ./tools/actions/start-ci.sh ${{ needs.get-prs-for-ci.outputs.numbers }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 1 addition & 4 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ on:
- '!.github/workflows/build-tarball.yml'

env:
PYTHON_VERSION: '3.10'
FLAKY_TESTS: dontcare

jobs:
build-tarball:
if: github.event.pull_request.draft == false
env:
PYTHON_VERSION: '3.10'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -57,8 +56,6 @@ jobs:
name: tarballs
path: tarballs
test-tarball-linux:
env:
PYTHON_VERSION: '3.10'
needs: build-tarball
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: build-windows
name: Build Windows

on:
pull_request:
paths-ignore:
- "README.md"
- README.md
- .github/**
- '!.github/workflows/build-windows.yml'
types: [opened, synchronize, reopened, ready_for_review]
Expand All @@ -15,7 +15,7 @@ on:
- v[0-9]+.x-staging
- v[0-9]+.x
paths-ignore:
- "README.md"
- README.md
- .github/**
- '!.github/workflows/build-windows.yml'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/comment-labeled.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Comment on issues and PRs when labelled
name: Comment on issues and PRs when labeled
on:
issues:
types: [labeled]
Expand All @@ -12,7 +12,7 @@ env:
FAST_TRACK_MESSAGE: Fast-track has been requested by @${{ github.actor }}. Please 👍 to approve.

jobs:
staleComment:
stale-comment:
if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled'
runs-on: ubuntu-latest
steps:
Expand All @@ -22,8 +22,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh issue comment "$NUMBER" --repo ${{ github.repository }} --body "$STALE_MESSAGE"

fastTrack:
if: github.repository == 'nodejs/node' && github.event_name == 'pull_request_target' && github.event.label.name == 'fast-track'
fast-track:
if: github.repository == 'nodejs/node' && github.event.issue.pull_request && github.event.label.name == 'fast-track'
runs-on: ubuntu-latest
steps:
- name: Request Fast-Track
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "First commit message adheres to guidelines at https://goo.gl/p2fr5Q"
name: First commit message adheres to guidelines at https://goo.gl/p2fr5Q

on: [pull_request]

Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: coverage-linux
name: Coverage Linux

on:
pull_request:
Expand All @@ -11,9 +11,7 @@ on:
- .github/**
- '!.github/workflows/coverage-linux.yml'
push:
branches:
- master
- main
branches: [master, main]
paths-ignore:
- '**.md'
- 'benchmark/**'
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/coverage-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: coverage-windows
name: Coverage Windows

on:
pull_request:
Expand All @@ -12,9 +12,7 @@ on:
- .github/**
- '!.github/workflows/coverage-windows.yml'
push:
branches:
- master
- main
branches: [master, main]
paths-ignore:
- '**.md'
- 'benchmark/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/misc.yml → .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: misc
name: Test and upload documentation to artifacts

on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license-builder.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: license update
name: License update
on:
schedule:
# 00:00:00 every Monday
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: linters
name: Linters

on:
pull_request:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
lint-sh:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notify-force-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: Notify on Force Push
jobs:
slackNotification:
name: Slack Notification
if: ${{ github.event.forced && github.repository == 'nodejs/node' }}
if: github.repository == 'nodejs/node' && github.event.forced
runs-on: ubuntu-latest
steps:
- name: Slack Notification
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-asan.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-asan
name: Test ASan

on:
pull_request:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test-internet.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-internet
name: Test internet

on:
workflow_dispatch:
Expand All @@ -7,17 +7,15 @@ on:

pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- test/internet/**
paths: [test/internet/**]
push:
branches:
- master
- main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
paths:
- test/internet/**
paths: [test/internet/**]

env:
PYTHON_VERSION: '3.10'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: test-linux
name: Test Linux

on:
pull_request:
paths-ignore:
- "README.md"
- README.md
- .github/**
- '!.github/workflows/test-linux.yml'
types: [opened, synchronize, reopened, ready_for_review]
Expand All @@ -15,7 +15,7 @@ on:
- v[0-9]+.x-staging
- v[0-9]+.x
paths-ignore:
- "README.md"
- README.md
- .github/**
- '!.github/workflows/test-linux.yml'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-macOS
name: Test macOS

on:
pull_request:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "tools update"
name: Tools update
on:
schedule:
# Run once a week at 00:05 AM UTC on Saturday.
Expand All @@ -7,7 +7,7 @@ on:
workflow_dispatch:

jobs:
tools_update:
tools-update:
if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit f7ff2ff

Please sign in to comment.