ci: Add github workflow for nitro node #50
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test install nitro-node | |
on: | |
schedule: | |
- cron: "0 20 * * *" # At 0:20 UTC, which is 7:20 AM UTC+7 | |
push: | |
branches: | |
- main | |
tags: ["v[0-9]+.[0-9]+.[0-9]+"] | |
paths: | |
- ".github/scripts/e2e-test-install-nitro-node.js" | |
- ".github/workflows/test-install-nitro-node.yml" | |
- "nitro-node/**" | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- ".github/scripts/e2e-test-install-nitro-node.js" | |
- ".github/workflows/test-install-nitro-node.yml" | |
- "nitro-node/**" | |
workflow_dispatch: | |
jobs: | |
linux-pack-tarball: | |
runs-on: ubuntu-latest | |
outputs: | |
tarball-url: ${{ steps.upload.outputs.artifact-url }} | |
steps: | |
- name: Clone | |
id: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Build tarball | |
id: build | |
run: | | |
cd nitro-node | |
make pack | |
find . -type f -name 'janhq-nitro-node-*.tgz' -exec mv {} janhq-nitro-node.tgz \; | |
- name: Upload tarball as artifact | |
id: upload | |
uses: actions/upload-artifact@master | |
with: | |
name: janhq-nitro-node | |
path: nitro-node/janhq-nitro-node.tgz | |
if-no-files-found: error | |
install: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- ubuntu-18-04-cuda-12-0 | |
- ubuntu-18-04-cuda-11-7 | |
- macos-silicon | |
- macos-latest | |
- windows-latest | |
- windows-cuda-12-0 | |
- windows-cuda-11-7 | |
needs: [linux-pack-tarball] | |
if: always() && needs.linux-pack-tarball.result == 'success' | |
steps: | |
- name: Clone | |
id: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Download prebuilt tarball | |
uses: actions/download-artifact@master | |
with: | |
name: janhq-nitro-node | |
path: .github/scripts/ | |
- name: List tarball content | |
id: tar-tf | |
run: | | |
cd .github | |
cd scripts | |
tar tf janhq-nitro-node.tgz | |
- name: Run tests | |
id: test_install_nitro_node | |
env: | |
NITRO_NODE_PKG: ${{ github.workspace }}/.github/scripts/janhq-nitro-node.tgz | |
run: | | |
cd .github | |
cd scripts | |
node e2e-test-install-nitro-node.js |