mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-09-26 06:38:07 +00:00
33
.github/workflows/unit-tests.yml
vendored
33
.github/workflows/unit-tests.yml
vendored
@@ -10,45 +10,30 @@ concurrency:
|
||||
env:
|
||||
FORCE_COLOR: 1
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
call-workflow:
|
||||
uses: kairos-io/linting-composite-action/.github/workflows/reusable-linting.yaml@d38a45447609f936c9d519bd14ed771b7214ad42 # v0.0.10
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install earthly
|
||||
uses: Luet-lab/luet-install-action@v1
|
||||
with:
|
||||
repository: quay.io/kairos/packages
|
||||
packages: utils/earthly
|
||||
- name: Run lint
|
||||
run: |
|
||||
earthly +lint
|
||||
is-go: true
|
||||
unit-tests:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ "1.23" ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install earthly
|
||||
uses: Luet-lab/luet-install-action@v1
|
||||
with:
|
||||
repository: quay.io/kairos/packages
|
||||
packages: utils/earthly
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@master
|
||||
- name: Setup Go environment
|
||||
uses: actions/setup-go@v5.4.0
|
||||
with:
|
||||
go-version-file: "go.mod"
|
||||
- name: Run tests
|
||||
run: |
|
||||
earthly -P +test --GO_VERSION=${{ matrix.go-version }}
|
||||
go run github.com/onsi/ginkgo/v2/ginkgo run --fail-fast --covermode=atomic --coverprofile=coverage.out -p -r ./...
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
with:
|
||||
file: ./coverage.out
|
||||
files: ./coverage.out
|
Reference in New Issue
Block a user