Ophestra Umiker
1da845d78b
Workflow scripts run as root in act-runner containers, so calling sudo is redundant and pointless. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
38 lines
795 B
YAML
38 lines
795 B
YAML
name: test
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup go
|
|
uses: https://github.com/actions/setup-go@v5
|
|
with:
|
|
go-version: '>=1.23.0'
|
|
|
|
- name: Get dependencies
|
|
run: >-
|
|
apt-get update &&
|
|
apt-get install -y
|
|
gcc
|
|
pkg-config
|
|
libacl1-dev
|
|
if: ${{ runner.os == 'Linux' }}
|
|
|
|
- name: Run tests
|
|
run: >-
|
|
go test ./...
|
|
|
|
- name: Build for Linux
|
|
run: >-
|
|
sh -c "go build -v -ldflags '-s -w -X main.Version=${{ github.ref_name }}' -o bin/fortify &&
|
|
sha256sum --tag -b bin/fortify > bin/fortify.sha256"
|