mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-13 04:46:46 +00:00
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.11 to 3.2.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](9b0c1fce7a...6998d139dd)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
92 lines
2.5 KiB
YAML
92 lines
2.5 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-20.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-20.04
|
|
needs: detect-noop
|
|
if: needs.detect-noop.outputs.noop != 'true'
|
|
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Cache Go Dependencies
|
|
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812
|
|
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 K3d
|
|
uses: nolar/setup-k3d-k3s@293b8e5822a20bc0d5bcdd4826f1a665e72aba96
|
|
with:
|
|
version: v1.20
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# TODO need update action version to resolve node 12 deprecated.
|
|
- name: install Kubebuilder
|
|
uses: RyanSiu1995/kubebuilder-action@ff52bff1bae252239223476e5ab0d71d6ba02343
|
|
with:
|
|
version: 3.1.0
|
|
kubebuilderOnly: false
|
|
kubernetesVersion: v1.21.2
|
|
|
|
- name: Run Make test
|
|
run: make test
|
|
|
|
- name: Upload coverage report
|
|
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
file: ./coverage.txt
|
|
flags: core-unittests
|
|
name: codecov-umbrella
|