43 lines
902 B
YAML
43 lines
902 B
YAML
name: Test and Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- feat/cicd
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
|
|
jobs:
|
|
test:
|
|
container:
|
|
image: docker.matri.cx/nix-runner:latest
|
|
credentials:
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
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: docker.matri.cx/nix-runner:latest
|
|
credentials:
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build binary
|
|
run: |
|
|
nix build
|
|
ls -alh ./result/bin/tricu
|