Skip to content

Commit

Permalink
Add tests to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
aibor committed Oct 29, 2023
1 parent a6abc75 commit 959b4ff
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,35 @@ on:

jobs:
go:
name: GolangCI Lint
name: Go lint and test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.21'

- uses: actions/checkout@v3

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest

- name: Run go tests
run: go test -race ./internal/... ./cmd/...

- name: Install packages for selftest
run: |
sudo apt-get update
sudo apt-get install qemu-system-x86-microvm linux-image-generic
sudo chmod go+r /boot/vmlinuz-*
- name: Run selftest wrapped
env:
PIDONETEST_KERNEL: /boot/vmlinuz
run: go run github.com/magefile/mage selftest 0 0

- name: Run selftest standalone
env:
PIDONETEST_KERNEL: /boot/vmlinuz
run: go run github.com/magefile/mage selftest 0 1

0 comments on commit 959b4ff

Please sign in to comment.