-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.65 KB
/
sonarcube.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
47
48
49
name: SonarCloud
on:
push:
branches:
- master
pull_request:
types: [labeled, opened, synchronize, reopened, unlabeled]
jobs:
sonarcloud:
name: SonarCloud
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependency') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up AWS credentials
env:
AWS_ACCESS_KEY_ID: "FOOBARKEY"
AWS_SECRET_ACCESS_KEY: "FOOBARSECRET"
run: |
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
- name: Run unittest with filenameprocessor-coverage
run: |
pip install poetry moto==4.2.11 coverage redis botocore==1.35.49 simplejson
poetry run coverage run --source=filenameprocessor -m unittest discover -s filenameprocessor
poetry run coverage xml -o filenameprocessor-coverage.xml
- name: Run unittest with recordprocessor-coverage
run: |
poetry run coverage run --source=recordprocessor -m unittest discover -s recordprocessor
poetry run coverage xml -o recordprocessor-coverage.xml
- name: Run unittest with recordforwarder-coverage
run: |
poetry run coverage run --source=recordforwarder -m unittest discover -s recordforwarder
poetry run coverage xml -o recordforwarder-coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}