2929 artifactory-deployer-role : qa-deployer
3030 deploy-pull-request : true
3131
32-
3332 formatting :
3433 name : " Formatting"
3534 runs-on : github-ubuntu-latest-s
3837 contents : write
3938 steps :
4039 - uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
41- - uses : jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
42- with :
43- install_args : " poetry@2.2.1"
44- - run : mise use -g poetry@2.2.1
45- - uses : SonarSource/ci-github-actions/build-poetry@v1
46- with :
47- sonar-platform : none
48- artifactory-reader-role : private-reader
49- artifactory-deployer-role : qa-deployer
50- - run : poetry install
40+ - uses : ./.github/actions/config-poetry
5141 - run : |
5242 poetry run black src/ tests/ --check
5343 poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d src/
@@ -66,33 +56,28 @@ jobs:
6656 with :
6757 install_args : " poetry@2.2.1"
6858 - run : mise use -g poetry@2.2.1
69- - run : poetry install
7059 - run : |
7160 poetry run python tools/generate_cli_documentation.py
7261 git diff --exit-code CLI_ARGS.md
7362
7463 analysis :
7564 name : " NEXT Analysis"
7665 runs-on : github-ubuntu-latest-s
66+ needs : [build]
7767 permissions :
7868 id-token : write
7969 contents : write
8070 steps :
8171 - uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
82- - uses : jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
83- with :
84- install_args : " poetry@2.2.1"
72+ - uses : ./.github/actions/config-poetry
8573 - run : |
86- mise use -g poetry@2.2.1
74+ poetry run pytest --cov-report=xml:coverage.xml --cov-config=pyproject.toml --cov=src --cov-branch tests
75+ poetry run mypy src/ > mypy-report.txt || true
8776 - uses : SonarSource/ci-github-actions/build-poetry@v1
8877 with :
8978 sonar-platform : next
9079 artifactory-reader-role : private-reader
9180 artifactory-deployer-role : qa-deployer
92- - run : poetry install
93- - run : |
94- poetry run pytest --cov-report=xml:coverage.xml --cov-config=pyproject.toml --cov=src --cov-branch tests
95- poetry run mypy src/ > mypy-report.txt || true
9681
9782 qa :
9883 name : " Test Python ${{ matrix.python-version }}"
@@ -105,17 +90,7 @@ jobs:
10590 python-version : ["3.9.18", "3.9.6", "3.10.13", "3.11.7", "3.12.1", "3.13.2"]
10691 steps :
10792 - uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
108- - uses : jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
109- with :
110- install_args : " poetry@2.2.1"
111- - run : mise use -g poetry@2.2.1
112- - uses : SonarSource/ci-github-actions/build-poetry@v1
113- with :
114- sonar-platform : none
115- python-version : ${{ matrix.python-version }}
116- artifactory-reader-role : private-reader
117- artifactory-deployer-role : qa-deployer
118- - run : poetry install
93+ - uses : ./.github/actions/config-poetry
11994 - run : |
12095 poetry run pytest tests/
12196
@@ -127,15 +102,7 @@ jobs:
127102 contents : write
128103 steps :
129104 - uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
130- - uses : jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
131- with :
132- install_args : " poetry@2.2.1"
133- - uses : SonarSource/ci-github-actions/build-poetry@v1
134- with :
135- sonar-platform : none
136- artifactory-reader-role : private-reader
137- artifactory-deployer-role : qa-deployer
138- - run : poetry install
105+ - uses : ./.github/actions/config-poetry
139106 - run : |
140107 poetry run pytest tests/
141108
@@ -148,7 +115,7 @@ jobs:
148115 steps :
149116 - uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
150117 - name : Cache SonarQube
151- uses : actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
118+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
152119 with :
153120 path : sonarqube_cache/
154121 key : sonarqube-25.3.0.104237
@@ -160,10 +127,8 @@ jobs:
160127 fi
161128 env :
162129 SONARQUBE_VERSION : 25.3.0.104237
163- - uses : SonarSource/ci-github-actions/build-poetry@v1
164- with :
165- sonar-platform : none
166- script : .github/scripts/run_its.sh
130+ - uses : ./.github/actions/config-poetry
131+ - run : .github/scripts/run_its.sh
167132
168133 promote :
169134 name : " Promote"
0 commit comments