37 lines
626 B
YAML
37 lines
626 B
YAML
![]() |
name: Test and Build
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- main
|
||
|
- feat/cicd
|
||
|
pull_request:
|
||
|
types:
|
||
|
- opened
|
||
|
- synchronize
|
||
|
|
||
|
jobs:
|
||
|
test:
|
||
|
container:
|
||
|
image: nixos/nix:latest
|
||
|
steps:
|
||
|
- name: Checkout code
|
||
|
uses: actions/checkout@v3
|
||
|
|
||
|
- name: Install dependencies and run tests
|
||
|
run: |
|
||
|
nix develop --command cabal test
|
||
|
|
||
|
build:
|
||
|
needs: test
|
||
|
container:
|
||
|
image: nixos/nix:latest
|
||
|
steps:
|
||
|
- name: Checkout code
|
||
|
uses: actions/checkout@v3
|
||
|
|
||
|
- name: Build binary
|
||
|
run: |
|
||
|
nix build
|
||
|
ls -alh ./result/bin/tricu
|