generated from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Aijeyomah/update-snapshot-payload
update payload to generate snapshot
- Loading branch information
Showing
9 changed files
with
238 additions
and
127 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
project_name: kanvas-snapshot | ||
version: 2 | ||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- main: cmd/kanvas-snapshot/main.go | ||
|
||
env: | ||
- CGO_ENABLED=0 | ||
|
||
ldflags: | ||
- -s -w | ||
- -X main.providerToken={{.Env.PROVIDER_TOKEN}} | ||
- -X main.MesheryCloudApiBaseUrl="https://meshery.layer5.io" | ||
- -X main.MesheryApiBaseUrl="https://playground.meshery.io" | ||
|
||
goos: | ||
- darwin | ||
- linux | ||
- windows | ||
|
||
goarch: | ||
- 386 | ||
- amd64 | ||
- arm | ||
- arm64 | ||
|
||
ignore: | ||
- goos: windows | ||
goarch: arm | ||
- goos: windows | ||
goarch: arm64 | ||
|
||
archives: | ||
- id: stable | ||
name_template: >- | ||
{{ .ProjectName }}_{{.Version}}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
format: tar.gz | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
version_template: "{{ .Tag }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
|
||
release: | ||
name_template: "Helm Kanvas Snapshot {{.Tag}}" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Golang Unit and Integration Tests | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
paths: | ||
- "**.go" | ||
pull_request: | ||
branches: | ||
- "master" | ||
paths: | ||
- "**.go" | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: "Log level" | ||
required: true | ||
default: "warning" | ||
|
||
jobs: | ||
golangci: | ||
strategy: | ||
matrix: | ||
go: [1.21] | ||
os: [ubuntu-22.04] | ||
name: golangci-lint | ||
if: github.repository == 'meshery/helm-kanvas-snapshot' | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache: false | ||
- uses: actions/checkout@v4 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.59 | ||
args: --config=.golangci.yml --timeout=10m | ||
unit-tests: | ||
name: Unit tests | ||
runs-on: ubuntu-22.04 | ||
needs: golangci | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.21" | ||
- name: Run coverage | ||
run: go test --short ./... -race -coverprofile=coverage.txt -covermode=atomic | ||
- name: Upload coverage to Codecov | ||
if: github.repository == 'meshery/helm-kanvas-snapshot' | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: ./coverage.txt | ||
flags: unittests | ||
integration-tests: | ||
name: Integration tests | ||
runs-on: ubuntu-22.04 | ||
needs: golangci | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.21" | ||
- name: Install Docker Compose | ||
run: | | ||
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Create k8s Kind Cluster | ||
uses: helm/kind-action@v1.10.0 | ||
with: | ||
cluster_name: "kind-cluster" | ||
- name: Run coverage | ||
run: | ||
# TODO: add tests for snapshot | ||
echo "Running kanvas snapshot test completed." | ||
|
||
- name: Upload coverage to Codecov | ||
if: github.repository == 'meshery/helm-kanvas-snapshot' | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: ./coverage.txt | ||
flags: gointegrationtests |
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
GOVERSION = 1.23 | ||
GITHUB_TOKEN="" | ||
MESHERY_API_COOKIE="" | ||
MESHERY_CLOUD_API_COOKIE="" | ||
OWNER="Aijeyomah" | ||
REPO="Ng-depl" | ||
WORKFLOW="meshmap.yml" | ||
BRANCH="new-mesh" | ||
PROVIDER_TOKEN="dev_token" | ||
MESHERY_CLOUD_API_BASE_URL="http://localhost:9876" | ||
MESHERY_API_BASE_URL="http://localhost:9081" | ||
SYSTEM_ID="3ae41e77-5626-42d3-aa04-ee871ad3035c" | ||
MESHERY_API_BASE_URL="http://localhost:3000" |
Oops, something went wrong.