-
Notifications
You must be signed in to change notification settings - Fork 19
91 lines (78 loc) · 2.73 KB
/
Copy pathci.yml
File metadata and controls
91 lines (78 loc) · 2.73 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: ci
on:
workflow_dispatch:
workflow_call:
push:
branches: [ main ]
pull_request:
paths:
- '.github/workflows/ci.yml'
- '**/*.go'
- testdata/**/*
- 'makefile'
- 'go.mod'
- 'go.sum'
- '!**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-and-verify:
uses: Open-CMSIS-Pack/workflows-and-actions-collection/.github/workflows/build-and-verify.yml@v3.0.0
secrets:
QLTY_COVERAGE_TOKEN: ${{ secrets.QLTY_COVERAGE_TOKEN }}
with:
program: cpackget
test-matrix: '[{"platform":"windows-2022","arch":"amd64"},{"platform":"ubuntu-24.04","arch":"amd64"},{"platform":"macos-14","arch":"amd64"},{"platform":"ubuntu-24.04","arch":"arm64"}]'
go-version-file: ./go.mod
enable-qlty-coverage: true
# Make sure local_repository.pidx is linted against PackIndex.xsd
xmllint:
name: Xmllint
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Check out repository code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
check-latest: true
- name: Install xmllint
run: sudo apt-get update && sudo apt-get install libxml2-utils
- name: Archive tpip report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: tpip-report
path: ./build/cpackget-ubuntu-amd64.txt
- name: Check if local_repository.pidx is valid
run: |
make test-xmllint-localrepository
publish-test-results:
name: "Publish Tests Results"
needs: [ build-and-verify ]
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.workflow != 'Release' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Download Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: artifacts
- name: publish test results
uses: EnricoMi/publish-unit-test-result-action/linux@d0a4676d0e0b938bc201470d88276b7c74c712b3 # v2.24.0
with:
files: artifacts/**/cpackget-testreport-*.xml
report_individual_runs: true