-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.41 KB
/
main.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
45
46
name: Main
on:
push:
env:
KOSLI_DRY_RUN: ${{ vars.KOSLI_DRY_RUN }} # false
KOSLI_HOST: ${{ vars.KOSLI_HOST }} # https://app.kosli.com
KOSLI_ORG: ${{ vars.KOSLI_ORG }} # cyber-dojo
KOSLI_API_TOKEN: ${{ secrets.KOSLI_API_TOKEN }}
jobs:
create-kosli-attestation-types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Kosli CLI
if: ${{ github.ref == 'refs/heads/main' }}
uses: kosli-dev/setup-cli-action@v2
with:
version: ${{ vars.KOSLI_CLI_VERSION }}
- name: Create test metrics attestation type
if: ${{ github.ref == 'refs/heads/main' }}
run:
kosli create attestation-type test-metrics
--schema=metrics-test.schema.json
--jq ".test_count >= 1"
--jq ".failure_count == 0"
--jq ".error_count == 0"
--jq ".skip_count == 0"
- name: Create coverage metrics attestation type
if: ${{ github.ref == 'refs/heads/main' }}
run:
kosli create attestation-type coverage-metrics
--schema=metrics-coverage.schema.json
--jq ".test.lines.total >= 1"
--jq ".test.lines.missed == 0"
--jq ".test.branches.total <= 20"
--jq ".test.branches.missed == 0"
--jq ".code.branches.total <= 200"