Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Cross-Repo Integration

on:
pull_request:
push:
branches: [master]
workflow_dispatch:

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you uninstall @metacall/protocol after this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.
The second npm i ./metacall-protocol-*.tgz overrides @metacall/protocol. But, adding it a better way.

npm uninstall @metacall/protocol
npm i ./metacall-protocol-*.tgz

- name: Build FaaS
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

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the same here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.
The second npm i ./metacall-protocol-*.tgz overrides @metacall/protocol. But, adding it a better way.

npm uninstall @metacall/protocol
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
Loading