mirror of
https://github.com/labring/sealos.git
synced 2026-08-29 01:39:49 +08:00
5d4c5b7a53
fix: workflow mutli call concurrency
52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
name: Check-Coverage
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: ["main"]
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "**/*.md"
|
|
- "**/*.yaml"
|
|
- "CHANGELOG/**"
|
|
pull_request:
|
|
branches: ["*"]
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "**/*.md"
|
|
- "**/*.yaml"
|
|
- "CHANGELOG/**"
|
|
|
|
# Avoid using ${{ github.workflow }} - when called via workflow_call, it inherits the caller's name causing conflicts
|
|
concurrency:
|
|
group: check-coverage-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
# Common versions
|
|
GO_VERSION: "1.25"
|
|
PROJECT_PATH: "./lifecycle"
|
|
|
|
jobs:
|
|
coverage:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Golang with cache
|
|
uses: magnetikonline/action-golang-cache@v5
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: Install Dependencies
|
|
run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
|
|
|
|
- name: Run Coverage
|
|
env:
|
|
PROJECT_PATH: ${{ env.PROJECT_PATH }}
|
|
run: cd "$PROJECT_PATH" && make coverage
|
|
|
|
- name: Upload Coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|