-
Notifications
You must be signed in to change notification settings - Fork 2
89 lines (78 loc) · 2.48 KB
/
ci.yml
File metadata and controls
89 lines (78 loc) · 2.48 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
name: CI
on:
pull_request:
branches: [master, main]
push:
branches: [master, main]
permissions:
contents: write
statuses: write
checks: write
pull-requests: write
jobs:
set-version:
runs-on: ubuntu-22.04
container:
image: mcr.microsoft.com/dotnet/sdk:10.0
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: set global dir
run: git config --system --add safe.directory "$GITHUB_WORKSPACE"
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4
with:
versionSpec: "6.x"
- name: Set SemVer Version
uses: gittools/actions/gitversion/execute@v4
id: gitversion
pr:
runs-on: ubuntu-22.04
needs: set-version
env:
REVISION: $GITHUB_SHA
SEMVER: ${{ needs.set-version.outputs.semVer }}
steps:
- uses: actions/checkout@v6
with:
# Disabling shallow clones is recommended for improving the relevancy of reporting
fetch-depth: 0
- uses: ensono/actions/eirctl-setup@v0.3.1
with:
version: latest
isPrerelease: false
- name: prep-git
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config user.email ${{ github.actor }}-ci@gha.org
git config user.name ${{ github.actor }}
- name: Run linters
run: |
eirctl run lints
- name: Unit Tests
run: |
eirctl run pipeline gha:unit:test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: success() || failure()
with:
report_paths: ".coverage/report-junit.xml"
commit: ${{ github.sha }}
fail_on_failure: true
check_name: aws-cli-auth Unit Tests
- name: Analyze with SonarCloud
uses: SonarSource/sonarqube-scan-action@v6
env:
# Needed to get PR information
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: .
args: >
-Dsonar.projectVersion=${{ needs.set-version.outputs.semVer }}
-Dsonar.working.directory=.scannerwork
-Dsonar.scm.provider=git