From deea6234fa7ba3300d558823f34903f15d27053b Mon Sep 17 00:00:00 2001 From: Priyanshu Kumar Date: Mon, 30 Mar 2026 00:51:13 +0530 Subject: [PATCH 1/4] unified ci for protocol, deplo and faas --- .github/workflows/integration.yml | 116 ++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 .github/workflows/integration.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..f67f980 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,116 @@ +name: Cross-Repo Integration + +on: + pull_request: + push: + branches: [master] + +concurrency: + group: protocol-integration-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + package-protocol: + name: Package Protocol (tgz) + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version: 24 + + - name: Install deps & build + run: | + npm ci + npm run build + + - name: Pack Protocol + run: npm pack + + - name: Upload Package + uses: actions/upload-artifact@v4 + with: + name: protocol-package + path: metacall-protocol-*.tgz + retention-days: 1 + + faas-tests: + name: Run FaaS Integration Tests + runs-on: ubuntu-latest + needs: package-protocol + steps: + - name: Setup NodeJs + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install MetaCall CLI + run: wget -O - https://raw.githubusercontent.com/metacall/install/master/install.sh | sh + + - name: Checkout FaaS repo + uses: actions/checkout@v4 + with: + repository: metacall/faas + path: faas + + - name: Download Protocol Package + uses: actions/download-artifact@v4 + with: + name: protocol-package + path: faas/ + + - name: Install deps with local Protocol + working-directory: faas + run: | + npm i + npm i ./metacall-protocol-*.tgz + + - name: Build FaaS + working-directory: faas + run: npm run build + + - name: Run Integration tests + working-directory: faas + run: npm run integration + + deploy-tests: + name: Run Deploy Tests + runs-on: ubuntu-latest + needs: package-protocol + steps: + - name: Setup NodeJs + uses: actions/setup-node@v4 + with: + node-version: 24 + + - name: Install MetaCall CLI + run: wget -O - https://raw.githubusercontent.com/metacall/install/master/install.sh | sh + + - name: Checkout Deploy repo + uses: actions/checkout@v4 + with: + repository: metacall/deploy + path: deploy + + - name: Download Protocol Package + uses: actions/download-artifact@v4 + with: + name: protocol-package + path: deploy/ + + - name: Install deps with local Protocol + working-directory: deploy + run: | + npm i + npm i ./metacall-protocol-*.tgz + + - name: Build Deploy + working-directory: deploy + run: npm run build + + - name: Run unit tests + working-directory: deploy + run: npm run unit From d84eb1ac118a7b1f6fb94e4381d42e2a47bb84c7 Mon Sep 17 00:00:00 2001 From: Priyanshu Kumar Date: Mon, 30 Mar 2026 00:55:10 +0530 Subject: [PATCH 2/4] Added manual workflow disptach --- .github/workflows/integration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f67f980..71212b0 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -4,6 +4,7 @@ on: pull_request: push: branches: [master] + workflow_dispatch: concurrency: group: protocol-integration-${{ github.event.pull_request.number || github.ref }} From 1fe1e7108e4b7fd474a045cb97fccb514b25e076 Mon Sep 17 00:00:00 2001 From: Priyanshu Kumar Date: Mon, 30 Mar 2026 02:14:24 +0530 Subject: [PATCH 3/4] Added uninstall protocol --- .github/workflows/integration.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 71212b0..0260073 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -67,6 +67,7 @@ jobs: working-directory: faas run: | npm i + npm uninstall @metacall/protocol npm i ./metacall-protocol-*.tgz - name: Build FaaS @@ -106,6 +107,7 @@ jobs: working-directory: deploy run: | npm i + npm uninstall @metacall/protocol npm i ./metacall-protocol-*.tgz - name: Build Deploy From 6b0b450b4800b89b271341b48cd81487c3b33f9f Mon Sep 17 00:00:00 2001 From: Priyanshu Kumar Date: Mon, 30 Mar 2026 02:57:37 +0530 Subject: [PATCH 4/4] Removed .tgz from dockerignore in faas --- .github/workflows/integration.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 0260073..b2ab416 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -74,6 +74,10 @@ jobs: working-directory: faas run: npm run build + - name: Allow tgz in Docker build + working-directory: faas + run: echo '!*.tgz' >> .dockerignore + - name: Run Integration tests working-directory: faas run: npm run integration