-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.16 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
backend-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Nix update
run: |
# Update nix
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update
- name: Load Nix shell
working-directory: ./apps/EnergyAnalyzer
run: nix-shell ../../shell.nix --run "echo 'Loading dev env'"
- name: Run unit tests
working-directory: ./apps/EnergyAnalyzer
run: |
nix-shell ../../shell.nix --run "just test"
coverageFilePath=$(find ./EnergyAnalyzer.Tests/TestResults -name 'coverage.cobertura.xml')
echo $coverageFilePath
echo "coverageFilePath=$coverageFilePath" >> $GITHUB_ENV
- uses: dennisjensen95/[email protected]
with:
coverage-filepath: apps/EnergyAnalyzer/${{ env.coverageFilePath }}
branch: main
threshold-total: 50
threshold-change: 80