Skip to content

FR-6083 - Improve spread tests #1534

FR-6083 - Improve spread tests

FR-6083 - Improve spread tests #1534

Workflow file for this run

name: Build and Tests
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
test-scenario: [short, long]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: install-go
run: sudo snap install go --classic
- name: build
run: go build ./...
- name: apt-update
run: sudo apt update
- name: install-test-dependencies
run: sudo apt install -y snapd germinate mtools debootstrap eatmydata fdisk gdisk qemu-system-aarch64 qemu-user-static ubuntu-dev-tools
- name: short tests
if: ${{ matrix.test-scenario == 'short' }}
run: sudo go test -timeout 0 -v -test.short -coverprofile=.coverage/coverage-short.out -covermode=atomic ./...
- name: long tests
if: ${{ matrix.test-scenario == 'long' }}
run: sudo go test -timeout 0 -v -coverprofile=.coverage/coverage-long.out -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
flags: unittests
files: .coverage/coverage-*.out
verbose: true