Skip to content

Merge branch 'meshery:master' into master #1443

Merge branch 'meshery:master' into master

Merge branch 'meshery:master' into master #1443

Workflow file for this run

name: Golang Unit and Integration Tests
on:
push:
branches:
- "master"
paths:
- "**.go"
- "**.golden"
- ".github/workflows/go-testing-ci.yml"
pull_request:
branches:
- "master"
paths:
- "**.go"
- "**.golden"
- ".github/workflows/go-testing-ci.yml"
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
jobs:
golangci:
strategy:
matrix:
go: [1.25]
os: [ubuntu-24.04]
name: golangci-lint
if: github.repository == 'meshery/meshery'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v6
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.7
args: --config=.github/.golangci.yml --timeout=10m
unit-tests:
name: Unit tests
runs-on: ubuntu-24.04
needs: golangci
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Install lynx for xdg-open support
run: sudo apt-get install lynx
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: "1.25"
- name: Run server coverage
run: go test --short ./server/... -race -coverprofile=server-coverage.txt -covermode=atomic
- name: Run mesheryctl coverage
run: go test --short ./mesheryctl/... -race -coverprofile=mesheryctl-coverage.txt -covermode=atomic
build-mesheryctl:
name: Build Meshery Binaries
runs-on: ubuntu-24.04
needs: golangci
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Install lynx for xdg-open support
run: sudo apt-get install lynx
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: "1.25"
- name: Build Mesheryctl Binaries
run: make
working-directory: ./mesheryctl
- uses: actions/upload-artifact@v6
with:
name: mesheryctl-binary
path: ./mesheryctl/mesheryctl
retention-days: 1
integration-tests:
name: Integration tests
runs-on: ubuntu-24.04
needs: [golangci, build-mesheryctl]
strategy:
fail-fast: false # ensure all matrix combinations run even if one fails
matrix:
platform: [docker, kubernetes]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Install lynx for xdg-open support
run: sudo apt-get install lynx
- uses: actions/download-artifact@v7
with:
name: mesheryctl-binary
path: ./mesheryctl/
- name: Verify Docker Details
run: |
docker version
docker compose ps
working-directory: ./install/docker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create k8s Kind Cluster
uses: helm/[email protected]
if: matrix.platform == 'kubernetes'
with:
cluster_name: "kind-cluster"
- name: Run mesheryctl integration tests
run: |
chmod +x ./mesheryctl;
./mesheryctl system start -p ${{ matrix.platform }};
./mesheryctl system update -y;
./mesheryctl system status -y;
./mesheryctl system restart -y;
./mesheryctl system check --preflight;
./mesheryctl system stop -y;
echo "Running Mesheryctl with ${{ matrix.platform }} completed."
working-directory: ./mesheryctl