init Gitea Actions
This commit is contained in:
parent
edde0a80c9
commit
7f10a57059
36
.gitea/workflows/test-and-build.yml
Normal file
36
.gitea/workflows/test-and-build.yml
Normal file
@ -0,0 +1,36 @@
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user