Testing gitea requirements
This commit is contained in:
parent
7f10a57059
commit
887d5d299f
@ -1,10 +1,11 @@
|
|||||||
name: Test and Build
|
name: Test and Build
|
||||||
|
|
||||||
|
name: Build and Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- feat/cicd
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
@ -13,24 +14,54 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
container:
|
container:
|
||||||
image: nixos/nix:latest
|
image: debian:bookworm-slim
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install prereqs
|
||||||
|
run: |
|
||||||
|
apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
sudo \
|
||||||
|
xz-utils \
|
||||||
|
gnupg \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
run: |
|
||||||
|
curl -L https://nixos.org/nix/install | sh
|
||||||
|
. /root/.nix-profile/etc/profile.d/nix.sh
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install dependencies and run tests
|
- name: Enter development shell and run tests
|
||||||
run: |
|
run: |
|
||||||
|
. /root/.nix-profile/etc/profile.d/nix.sh
|
||||||
nix develop --command cabal test
|
nix develop --command cabal test
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: test
|
|
||||||
container:
|
container:
|
||||||
image: nixos/nix:latest
|
image: debian:bookworm-slim
|
||||||
|
needs: test
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install prereqs
|
||||||
|
run: |
|
||||||
|
apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
sudo \
|
||||||
|
xz-utils \
|
||||||
|
gnupg \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
run: |
|
||||||
|
curl -L https://nixos.org/nix/install | sh
|
||||||
|
. /root/.nix-profile/etc/profile.d/nix.sh
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
run: |
|
run: |
|
||||||
|
. /root/.nix-profile/etc/profile.d/nix.sh
|
||||||
nix build
|
nix build
|
||||||
ls -alh ./result/bin/tricu
|
ls -l ./result/bin/tricu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user