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