5
This commit is contained in:
parent
237f0d5241
commit
6e28cb6fd2
@ -13,26 +13,30 @@ on:
|
||||
jobs:
|
||||
test:
|
||||
container:
|
||||
image: debian:bullseye-slim
|
||||
image: docker.matri.cx/nix-runner:latest
|
||||
credentials:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
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
|
||||
- name: Install dependencies and run tests
|
||||
run: |
|
||||
. /etc/profile.d/nix.sh
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user