Skip to content

ci: add ci tests

ci: add ci tests #11

Workflow file for this run

name: CI
on:
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
go-version: [1.21.x]
platform: [ubuntu-latest]
test-type: [unit, integration]
runs-on: ${{ matrix.platform }}
steps:
- name: install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: checkout code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: non-Go dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -qq libudev-dev
- name: unit tests
if: matrix.test-type == 'unit'
run: |
go test ./rpc ./internal/...
- name: integration tests
if: matrix.test-type == 'integration'
run: |
go test ./cmd/...