mirror of
https://github.com/kairos-io/immucore.git
synced 2025-05-14 11:00:14 +00:00
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: Unit tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ci-unit-${{ github.head_ref || github.ref }}-${{ github.repository }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: earthly/actions-setup@v1
|
|
- name: Run Lint checks
|
|
run: earthly +golint
|
|
unit-tests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
# Match this version to the maintained FIPS version in packages at https://github.com/kairos-io/packages/blob/main/packages/toolchain-go/collection.yaml#L63
|
|
go-version: [ "1.19.10-bookworm", "1.20-bookworm", "1.21-bookworm" ]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: earthly/actions-setup@v1
|
|
- name: Build
|
|
run: earthly +build
|
|
- name: Run tests
|
|
run: earthly +test --GO_VERSION=${{ matrix.go-version }}
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
file: ./coverage.out
|