tricu/.gitea/workflows/test-and-build.yml

39 lines
814 B
YAML
Raw Normal View History

2025-01-21 12:24:11 -06:00
name: Test and Build
on:
push:
branches:
- main
2025-01-21 12:35:13 -06:00
- feat/cicd
2025-01-21 12:24:11 -06:00
pull_request:
types:
- opened
- synchronize
jobs:
test:
container:
2025-01-21 12:39:50 -06:00
image: debian:bullseye-slim
2025-01-21 12:24:11 -06:00
steps:
2025-01-21 12:39:50 -06:00
- name: Install prerequisites
2025-01-21 12:33:55 -06:00
run: |
apt-get update && apt-get install -y \
curl \
sudo \
xz-utils \
gnupg \
&& rm -rf /var/lib/apt/lists/*
2025-01-21 12:39:50 -06:00
- name: Install Nix with nix install
2025-01-21 12:33:55 -06:00
run: |
2025-01-21 12:39:50 -06:00
curl -L https://nixos.org/releases/nix/nix-2.15.0/install | sh
. /etc/profile.d/nix.sh
2025-01-21 12:33:55 -06:00
2025-01-21 12:24:11 -06:00
- name: Checkout code
uses: actions/checkout@v3
2025-01-21 12:33:55 -06:00
- name: Enter development shell and run tests
2025-01-21 12:24:11 -06:00
run: |
2025-01-21 12:39:50 -06:00
. /etc/profile.d/nix.sh
2025-01-21 12:24:11 -06:00
nix develop --command cabal test