Fluvio CI with latest fluvio #771
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: Fluvio CI with latest fluvio | |
concurrency: | |
group: latest-fluvio-ci-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
schedule: | |
- cron: "0 14 * * *" | |
jobs: | |
smoke_test: | |
name: Test against Dev cluster | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
rust: [stable] | |
node: ["18", "20"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- uses: actions-rs/[email protected] | |
with: | |
crate: nj-cli | |
version: latest | |
use-tool-cache: true | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Update the fluvio client to use the latest on the fluvio master branch. | |
run: | | |
# work around cargo bug | |
#cargo add fluvio --git https://github.com/infinyon/fluvio --branch master | |
sed -i "s/fluvio = { features = .*/fluvio = { features = \[\"admin\"\], git = \"https:\/\/github.com\/infinyon\/fluvio.git\" }/g" Cargo.toml | |
cargo add fluvio-spu-schema --git https://github.com/infinyon/fluvio --branch master | |
git diff Cargo.toml | |
- name: cargo check | |
run: | | |
cargo check | |
- uses: AbsaOSS/k3d-action@v2 | |
name: "Create fluvio k3d Cluster" | |
with: | |
cluster-name: "fluvio" | |
- name: Sleep 20 to ensure k3d cluster is ready | |
run: sleep 20 | |
# TODO: Ideally we'd install fluvio and start the cluster from the | |
# composite action. The composite action doesn't support installing the | |
# `--development` version of fluvio | |
# - name: Install Fluvio Cluster | |
# uses: infinyon/fluvio@master | |
# with: | |
# cluster-type: local | |
# version: latest | |
- name: Install fluvio | |
run: | | |
curl -fsS https://hub.infinyon.cloud/install/install.sh?ctx=ci | bash | |
echo "${HOME}/.fvm/bin" >> $GITHUB_PATH | |
echo "${HOME}/.fluvio/bin" >> $GITHUB_PATH | |
- name: Update fluvio client to development and start the local cluster. | |
run: | | |
fvm install latest | |
fluvio cluster start --rust-log debug --local | |
- name: Sleep 10 to ensure the fluvio cluster is ready | |
run: sleep 10 | |
- name: Check Fluvio Installation | |
run: | | |
fluvio version | |
fluvio topic list | |
fluvio topic create foobar | |
sleep 3 | |
echo foo | fluvio produce foobar | |
fluvio consume foobar -B -d | |
- name: Install and Build | |
run: | | |
npm install | |
- name: Test | |
run: | | |
make test_all | |
- name: Run Examples | |
run: | | |
FLUVIO_DEV=1 make examples | |
- name: Slack Notification | |
uses: 8398a7/action-slack@v3 | |
if: failure() | |
with: | |
status: ${{ job.status }} | |
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |