Skip to content

Commit

Permalink
ci: make autobahn workflow reusable workflow, run the autobahn on nig…
Browse files Browse the repository at this point in the history
…htly tests (#3503)

* ci: make autobahn workflow reusable workflow

* Apply suggestions from code review

* wroom wroom

* wroom wroom
  • Loading branch information
Uzlopak authored Aug 27, 2024
1 parent 8a09d77 commit 409222c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/autobahn.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Autobahn

on:
workflow_dispatch:

workflow_call:
inputs:
node-version:
default: '22'
type: string
pull_request:
paths:
- '.github/workflows/autobahn.yml'
- 'lib/web/websocket/**'
- 'test/autobahn/**'

permissions:
contents: read
pull-requests: write
Expand Down Expand Up @@ -39,10 +43,10 @@ jobs:
with:
args: docker restart --time 0 --signal=SIGKILL fuzzingserver

- name: Setup Node
- name: Setup Node.js@${{ inputs.node-version || '22' }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 22
node-version: ${{ inputs.node-version || '22' }}

- name: Run Autobahn Test Suite
run: npm run test:websocket:autobahn
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
runs-on: ubuntu-latest
secrets: inherit

test-autobahn:
if: github.repository == 'nodejs/undici'
uses: ./.github/workflows/autobahn.yml
with:
node-version: 23-nightly
secrets: inherit

test-windows:
if: github.repository == 'nodejs/undici'
uses: ./.github/workflows/test.yml
Expand All @@ -39,6 +46,7 @@ jobs:
- test-linux
- test-windows
- test-macos
- test-autobahn
runs-on: ubuntu-latest
permissions:
issues: write
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/triggered-autobahn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Autobahn

on:
pull_request:
types:
- labeled

permissions:
contents: read
pull-requests: write

jobs:
autobahn:
if: ${{ github.event.label.name == 'autobahn' }}
name: Autobahn Test Suite
uses: ./.github/workflows/autobahn.yml

0 comments on commit 409222c

Please sign in to comment.