WIP: .gitea/workflows: generate coverage
Also run the tests without concurrency to stabilize
This commit is contained in:
@@ -13,9 +13,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Install nix
|
- name: Install nix
|
||||||
uses: https://github.com/cachix/install-nix-action@v31
|
uses: https://github.com/cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
- name: Configure nix
|
extra_nix_config: |
|
||||||
run: echo -e "show-trace = true\nmax-jobs = auto\ntrusted-users = root\nexperimental-features = nix-command flakes\nbuild-users-group =" > /etc/nix/nix.conf
|
experimental-features = nix-command flakes
|
||||||
|
show-trace = true
|
||||||
|
max-jobs = auto
|
||||||
|
trusted-users = root
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
build-users-group =
|
||||||
|
|
||||||
- name: Update database inputs
|
- name: Update database inputs
|
||||||
run: |
|
run: |
|
||||||
@@ -28,4 +33,24 @@ jobs:
|
|||||||
run: nix build .#database -L
|
run: nix build .#database -L
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: nix develop .# --command dart test
|
run: nix develop .# --command dart run test --coverage coverage/lcov.info --concurrency=1
|
||||||
|
|
||||||
|
- name: Generate coverage report
|
||||||
|
run: |
|
||||||
|
GENHTML_ARGS=(
|
||||||
|
--current-date="$(date)"
|
||||||
|
--dark-mode
|
||||||
|
--output-directory coverage/report
|
||||||
|
)
|
||||||
|
|
||||||
|
nix develop .# --command genhtml "${GENHTML_ARGS[@]}" coverage/lcov.info
|
||||||
|
|
||||||
|
- name: Upload coverage report
|
||||||
|
uses: https://git.pvv.ntnu.no/Projects/rsync-action@v2
|
||||||
|
with:
|
||||||
|
source: ./coverage
|
||||||
|
target: jadb/${{ gitea.ref_name }}/
|
||||||
|
username: oysteikt
|
||||||
|
ssh-key: ${{ secrets.OYSTEIKT_GITEA_WEBDOCS_SSH_KEY }}
|
||||||
|
host: microbel.pvv.ntnu.no
|
||||||
|
known-hosts: "microbel.pvv.ntnu.no ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEq0yasKP0mH6PI6ypmuzPzMnbHELo9k+YB5yW534aKudKZS65YsHJKQ9vapOtmegrn5MQbCCgrshf+/XwZcjbM="
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
# Conventional directory for build output.
|
# Conventional directory for build output.
|
||||||
/doc/
|
/doc/
|
||||||
/build/
|
/build/
|
||||||
|
/coverage/
|
||||||
main.db
|
main.db
|
||||||
|
|
||||||
# Nix
|
# Nix
|
||||||
|
|||||||
Reference in New Issue
Block a user