Skip to content

Commit

Permalink
build: improve consistency between workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Mesteery committed Nov 27, 2021
1 parent a257294 commit 5bcdd2e
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 41 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
4 changes: 2 additions & 2 deletions .github/workflows/auto-start-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ env:
NODE_VERSION: lts/*

jobs:
startCI:
start-ci:
if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# 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 Down
5 changes: 1 addition & 4 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ on:
- 'doc/**'

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 @@ -51,8 +50,6 @@ jobs:
name: tarballs
path: tarballs
test-tarball-linux:
env:
PYTHON_VERSION: '3.10'
needs: build-tarball
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: build-windows
name: Build Windows

on:
pull_request:
paths-ignore:
- "README.md"
paths-ignore: [README.md]
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
Expand All @@ -12,8 +11,7 @@ on:
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
paths-ignore:
- "README.md"
paths-ignore: [README.md]

env:
PYTHON_VERSION: '3.10'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/comment-labeled.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Comment on issues and PRs when labelled
name: Comment on issues and PRs when labeled
on:
issues:
types: [labeled]
pull_request_target:
types: [labeled]

jobs:
staleComment:
stale-comment:
if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled'
runs-on: ubuntu-latest
steps:
Expand All @@ -19,7 +19,7 @@ jobs:
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
--data '{ "body": "This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open." }'
fastTrack:
fast-track:
if: github.repository == 'nodejs/node' && github.event_name == 'pull_request_target' && github.event.label.name == 'fast-track'
runs-on: ubuntu-latest
steps:
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 @@ -9,9 +9,7 @@ on:
- 'deps/**'
- 'doc/**'
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 @@ -10,9 +10,7 @@ on:
- 'doc/**'
- 'tools/**'
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 @@ -109,7 +109,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
- run: shellcheck -V
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 5bcdd2e

Please sign in to comment.