tricu/.gitea/workflows/test-and-build.yml
Workflow config file is invalid. Please check your config file: yaml: unmarshal errors: line 3: mapping key "name" already defined at line 1
2025-01-21 12:33:55 -06:00

68 lines
1.4 KiB
YAML

name: Test and Build
name: Build and Test
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
jobs:
test:
container:
image: debian:bookworm-slim
steps:
- name: Install prereqs
run: |
apt-get update && apt-get install -y \
curl \
sudo \
xz-utils \
gnupg \
&& rm -rf /var/lib/apt/lists/*
- name: Install Nix
run: |
curl -L https://nixos.org/nix/install | sh
. /root/.nix-profile/etc/profile.d/nix.sh
- name: Checkout code
uses: actions/checkout@v3
- name: Enter development shell and run tests
run: |
. /root/.nix-profile/etc/profile.d/nix.sh
nix develop --command cabal test
build:
container:
image: debian:bookworm-slim
needs: test
steps:
- name: Install prereqs
run: |
apt-get update && apt-get install -y \
curl \
sudo \
xz-utils \
gnupg \
&& rm -rf /var/lib/apt/lists/*
- name: Install Nix
run: |
curl -L https://nixos.org/nix/install | sh
. /root/.nix-profile/etc/profile.d/nix.sh
- name: Checkout code
uses: actions/checkout@v3
- name: Build binary
run: |
. /root/.nix-profile/etc/profile.d/nix.sh
nix build
ls -l ./result/bin/tricu