fortify/.gitea/workflows/test.yml
Ophestra Umiker 4032b6de15
Some checks failed
Tests / Go tests (push) Failing after 55s
Nix / NixOS tests (push) Has been cancelled
workflows: build and upload test distribution
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-12-18 19:57:03 +09:00

56 lines
1.3 KiB
YAML

name: Tests
on:
- push
- pull_request
jobs:
test:
name: Go tests
runs-on: ubuntu-latest
container:
image: node:16-bookworm-slim
steps:
- name: Get dependencies
run: >-
echo 'deb http://deb.debian.org/debian bookworm-backports main' >> /etc/apt/sources.list.d/backports.list &&
apt-get update &&
apt-get install -y
acl
git
gcc
pkg-config
libwayland-dev
wayland-protocols/bookworm-backports
libxcb1-dev
libacl1-dev
if: ${{ runner.os == 'Linux' }}
- 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: Go generate
run: >-
go generate ./...
- name: Run tests
run: >-
go test ./...
- name: Build for test
run: FORTIFY_VERSION='${{ github.ref_name }}' ./dist/release.sh
- name: Upload test build
uses: actions/upload-artifact@v4
with:
name: "dist/fortify-${{ github.ref_name }}.tar.gz"
path: "dist/fortify-${{ github.ref_name }}.tar.gz"
retention-days: 1