mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-09-26 14:47:33 +00:00
33
.github/workflows/unit-tests.yml
vendored
33
.github/workflows/unit-tests.yml
vendored
@@ -10,45 +10,30 @@ concurrency:
|
|||||||
env:
|
env:
|
||||||
FORCE_COLOR: 1
|
FORCE_COLOR: 1
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
call-workflow:
|
||||||
runs-on: ubuntu-latest
|
uses: kairos-io/linting-composite-action/.github/workflows/reusable-linting.yaml@d38a45447609f936c9d519bd14ed771b7214ad42 # v0.0.10
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
is-go: true
|
||||||
- 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
|
|
||||||
unit-tests:
|
unit-tests:
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
go-version: [ "1.23" ]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@master
|
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
|
- name: Run tests
|
||||||
run: |
|
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
|
- name: Codecov
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
env:
|
env:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
with:
|
with:
|
||||||
file: ./coverage.out
|
files: ./coverage.out
|
Reference in New Issue
Block a user