mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-20 00:07:27 +00:00
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](88522ab9f3...704facf57e)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
90 lines
2.3 KiB
YAML
90 lines
2.3 KiB
YAML
name: Unit-Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- release-*
|
|
workflow_dispatch: { }
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- release-*
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
# Common versions
|
|
GO_VERSION: '1.19'
|
|
|
|
jobs:
|
|
|
|
detect-noop:
|
|
permissions:
|
|
actions: write # for fkirc/skip-duplicate-actions to skip or stop workflow runs
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
noop: ${{ steps.noop.outputs.should_skip }}
|
|
steps:
|
|
- name: Detect No-op Changes
|
|
id: noop
|
|
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
|
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
|
|
continue-on-error: true
|
|
|
|
unit-tests:
|
|
runs-on: ubuntu-22.04
|
|
needs: detect-noop
|
|
if: needs.detect-noop.outputs.noop != 'true'
|
|
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Cache Go Dependencies
|
|
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
|
|
with:
|
|
path: .work/pkg
|
|
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: ${{ runner.os }}-pkg-
|
|
|
|
- name: Install ginkgo
|
|
run: |
|
|
sudo sed -i 's/azure\.//' /etc/apt/sources.list
|
|
sudo apt-get update
|
|
sudo apt-get install -y golang-ginkgo-dev
|
|
|
|
- name: Setup KinD
|
|
run: |
|
|
go install sigs.k8s.io/kind@v0.19.0
|
|
kind create cluster
|
|
|
|
- name: install Kubebuilder
|
|
uses: RyanSiu1995/kubebuilder-action@7170cb0476187070ae04cbb6cee305e809de2693
|
|
with:
|
|
version: 3.9.1
|
|
kubebuilderOnly: false
|
|
kubernetesVersion: v1.26.2
|
|
|
|
- name: Run Make test
|
|
run: make test
|
|
|
|
- name: Upload coverage report
|
|
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
file: ./coverage.txt
|
|
flags: core-unittests
|
|
name: codecov-umbrella
|