.gitea/workflows/build-and-test: init
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
|
||||
name: "Build and test"
|
||||
run-name: "Build and test"
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
BINSTALL_DISABLE_TELEMETRY: 'true'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: debian-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install sudo
|
||||
run: apt-get install --update --assume-yes sudo
|
||||
|
||||
- name: Install Nix
|
||||
uses: https://github.com/cachix/install-nix-action@v31
|
||||
|
||||
- name: Build project
|
||||
run: nix build .#wamf
|
||||
|
||||
build-freebsd-cross:
|
||||
runs-on: debian-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install sudo
|
||||
run: apt-get install --update --assume-yes sudo
|
||||
|
||||
- name: Install Nix
|
||||
uses: https://github.com/cachix/install-nix-action@v31
|
||||
|
||||
- name: Build project for FreeBSD
|
||||
run: nix build .#wamf-freebsd-cross
|
||||
|
||||
test:
|
||||
runs-on: debian-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install sudo
|
||||
run: apt-get install --update --assume-yes sudo
|
||||
|
||||
- name: Install Nix
|
||||
uses: https://github.com/cachix/install-nix-action@v31
|
||||
|
||||
- name: Test and build coverage report
|
||||
run: nix build .#coverage-html
|
||||
|
||||
- name: Upload coverage report
|
||||
uses: https://git.pvv.ntnu.no/Projects/rsync-action@v1
|
||||
with:
|
||||
source: result/
|
||||
target: ${{ gitea.ref_name }}/coverage/
|
||||
username: gitea-web
|
||||
ssh-key: ${{ secrets.WEB_SYNC_SSH_KEY }}
|
||||
host: pages.pvv.ntnu.no
|
||||
known-hosts: "pages.pvv.ntnu.no ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2QjfFB+city1SYqltkVqWACfo1j37k+oQQfj13mtgg"
|
||||
Reference in New Issue
Block a user