Skip to content

Refactor: Split up the GitHub actions. Add badges #4

Refactor: Split up the GitHub actions. Add badges

Refactor: Split up the GitHub actions. Add badges #4

Workflow file for this run

name: Test
defaults:
run:
shell: bash
on:
push:
branches:
- '**'
jobs:
build:
name: 🧪 Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.4
- name: 🏗 Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y xorg-dev libgl1-mesa-dev
- name: Set up gotestfmt
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
# Run tests with nice formatting. Save the original log in /tmp/gotest.log
- name: 🧪 Execute Tests
run: |
set -euo pipefail
go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
# Upload the original go test log as an artifact for later review.
- name: Upload test log
uses: actions/upload-artifact@v2
if: always()
with:
name: test-log
path: /tmp/gotest.log
if-no-files-found: error