mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-05 23:33:08 +00:00
Merge pull request #1566 from waku-org/chore/split-ci-into-chunks
This commit is contained in:
commit
a0c96bb3f3
159
.github/workflows/ci.yml
vendored
159
.github/workflows/ci.yml
vendored
@ -13,14 +13,6 @@ on:
|
|||||||
description: "Docker hub image name taken from https://hub.docker.com/r/statusteam/nim-waku/tags. Format: statusteam/nim-waku:v0.19.0"
|
description: "Docker hub image name taken from https://hub.docker.com/r/statusteam/nim-waku/tags. Format: statusteam/nim-waku:v0.19.0"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
nim_wakunode_image:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
caller:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_JS: "18"
|
NODE_JS: "18"
|
||||||
@ -28,7 +20,6 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ inputs.caller == null || inputs.caller != 'nwaku' }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@ -44,7 +35,6 @@ jobs:
|
|||||||
|
|
||||||
proto:
|
proto:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ inputs.caller == null || inputs.caller != 'nwaku' }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@ -66,7 +56,6 @@ jobs:
|
|||||||
|
|
||||||
browser:
|
browser:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ inputs.caller == null || inputs.caller != 'nwaku' }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@ -79,145 +68,35 @@ jobs:
|
|||||||
- run: npm run test:browser
|
- run: npm run test:browser
|
||||||
|
|
||||||
node:
|
node:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/test-node.yml
|
||||||
env:
|
with:
|
||||||
WAKUNODE_IMAGE: ${{ inputs.nim_wakunode_image || 'statusteam/nim-waku:v0.19.0' }}
|
nim_wakunode_image: ${{ inputs.nim_wakunode_image || 'statusteam/nim-waku:v0.19.0' }}
|
||||||
steps:
|
test_type: node
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: waku-org/js-waku
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_JS }}
|
|
||||||
|
|
||||||
- uses: ./.github/actions/npm
|
|
||||||
|
|
||||||
- run: npm run build:esm
|
|
||||||
|
|
||||||
- run: npm run test:node
|
|
||||||
env:
|
|
||||||
DEBUG: ""
|
|
||||||
|
|
||||||
- name: Upload debug logs on failure
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: debug.log
|
|
||||||
path: debug.log
|
|
||||||
|
|
||||||
- name: Upload nwaku logs on failure
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: nwaku-logs
|
|
||||||
path: packages/tests/log/
|
|
||||||
|
|
||||||
node_optional:
|
node_optional:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/test-node.yml
|
||||||
env:
|
with:
|
||||||
WAKUNODE_IMAGE: ${{ inputs.nim_wakunode_image || 'statusteam/nim-waku:v0.19.0' }}
|
nim_wakunode_image: ${{ inputs.nim_wakunode_image || 'statusteam/nim-waku:v0.19.0' }}
|
||||||
|
test_type: node-optional
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: waku-org/js-waku
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_JS }}
|
|
||||||
|
|
||||||
- uses: ./.github/actions/npm
|
|
||||||
|
|
||||||
- run: npm run build:esm
|
|
||||||
|
|
||||||
- run: npm run test:optional --workspace=@waku/tests
|
|
||||||
env:
|
|
||||||
DEBUG: ""
|
|
||||||
|
|
||||||
node_with_go_waku_master:
|
node_with_go_waku_master:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/test-node.yml
|
||||||
if: ${{ inputs.caller == null || inputs.caller != 'nwaku' }}
|
with:
|
||||||
env:
|
nim_wakunode_image: statusteam/go-waku:latest
|
||||||
WAKUNODE_IMAGE: "statusteam/go-waku:latest"
|
test_type: go-waku-master
|
||||||
WAKU_SERVICE_NODE_PARAMS: "--min-relay-peers-to-publish=0" # Can be removed once https://github.com/status-im/nwaku/issues/1004 is done
|
debug: waku*
|
||||||
DEBUG: "waku*"
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: waku-org/js-waku
|
|
||||||
|
|
||||||
- name: Install NodeJS
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_JS }}
|
|
||||||
|
|
||||||
- uses: ./.github/actions/npm
|
|
||||||
|
|
||||||
- run: npm run build:esm
|
|
||||||
|
|
||||||
- run: npm run test:node
|
|
||||||
env:
|
|
||||||
DEBUG: "waku:nwaku*,waku:test*"
|
|
||||||
|
|
||||||
- name: Upload debug logs on failure
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: go-waku-debug.log
|
|
||||||
path: debug.log
|
|
||||||
|
|
||||||
- name: Upload logs on failure
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: go-waku-logs
|
|
||||||
path: packages/tests/log/
|
|
||||||
|
|
||||||
node_with_nwaku_master:
|
node_with_nwaku_master:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/test-node.yml
|
||||||
if: ${{ inputs.caller == null || inputs.caller != 'nwaku' }}
|
with:
|
||||||
env:
|
nim_wakunode_image: statusteam/nim-waku:deploy-wakuv2-test
|
||||||
DEBUG: "waku*"
|
test_type: nwaku-master
|
||||||
WAKUNODE_IMAGE: "statusteam/nim-waku:deploy-wakuv2-test"
|
debug: waku*
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: waku-org/js-waku
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_JS }}
|
|
||||||
|
|
||||||
- uses: ./.github/actions/npm
|
|
||||||
|
|
||||||
- run: npm run build:esm
|
|
||||||
|
|
||||||
- run: npm run test:node
|
|
||||||
env:
|
|
||||||
DEBUG: "waku:nwaku*,waku:test*"
|
|
||||||
|
|
||||||
- name: Upload debug logs on failure
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: nwaku-master-debug.log
|
|
||||||
path: debug.log
|
|
||||||
|
|
||||||
- name: Upload logs on failure
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: nwaku-master-logs
|
|
||||||
path: packages/tests/log/
|
|
||||||
|
|
||||||
maybe-release:
|
maybe-release:
|
||||||
name: release
|
name: release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: >
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||||
github.event_name == 'push' &&
|
|
||||||
github.ref == 'refs/heads/master' &&
|
|
||||||
(github.event.inputs.caller == null || github.event.inputs.caller != 'nwaku')
|
|
||||||
needs: [check, proto, browser, node]
|
needs: [check, proto, browser, node]
|
||||||
steps:
|
steps:
|
||||||
- uses: google-github-actions/release-please-action@v3
|
- uses: google-github-actions/release-please-action@v3
|
||||||
|
|||||||
54
.github/workflows/test-node.yml
vendored
Normal file
54
.github/workflows/test-node.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
name: Run Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
nim_wakunode_image:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
test_type:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
debug:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ''
|
||||||
|
|
||||||
|
env:
|
||||||
|
NODE_JS: "18"
|
||||||
|
WAKU_SERVICE_NODE_PARAMS: ${{ (inputs.test_type == 'go-waku-master') && '--min-relay-peers-to-publish=0' || '' }}
|
||||||
|
DEBUG: ${{ inputs.debug }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
node:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
WAKUNODE_IMAGE: ${{ inputs.nim_wakunode_image }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: waku-org/js-waku
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ env.NODE_JS }}
|
||||||
|
|
||||||
|
- uses: ./.github/actions/npm
|
||||||
|
|
||||||
|
- run: npm run build:esm
|
||||||
|
|
||||||
|
- run: ${{ (inputs.test_type == 'node-optional') && 'npm run test:optional --workspace=@waku/tests' || 'npm run test:node' }}
|
||||||
|
|
||||||
|
- name: Upload debug logs on failure
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.test_type }}-debug.log
|
||||||
|
path: debug.log
|
||||||
|
|
||||||
|
- name: Upload logs on failure
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.test_type }}-logs
|
||||||
|
path: packages/tests/log/
|
||||||
Loading…
x
Reference in New Issue
Block a user