Skip to content

Commit 1e0a259

Browse files
committed
Test for formatting
1 parent 0284700 commit 1e0a259

1 file changed

Lines changed: 30 additions & 25 deletions

File tree

.github/workflows/build.yml

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,28 @@ jobs:
3939
contents: write
4040
steps:
4141
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
42-
with:
43-
script: |
44-
mise install poetry
45-
poetry run black src/ tests/ --check
46-
poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d src/
47-
poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d tests/
48-
git diff --name-only --exit-code ./src ./tests
49-
sonar-platform: none
42+
- run: |
43+
poetry run black src/ tests/ --check
44+
poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d src/
45+
poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d tests/
46+
git diff --name-only --exit-code ./src ./tests
5047
5148
documentation:
5249
name: "CLI Documentation"
5350
runs-on: github-ubuntu-latest-s
5451
needs: [build]
5552
permissions:
5653
id-token: write
57-
contents: write
54+
contents: read
5855
steps:
5956
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
60-
- uses: SonarSource/ci-github-actions/build-poetry@v1
57+
- uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 #v3.3.1
6158
with:
62-
script: |
63-
poetry run python tools/generate_cli_documentation.py
64-
git diff --exit-code CLI_ARGS.md
65-
sonar-platform: none
59+
install_args: "poetry@2.2.1"
60+
- run: |
61+
mise use -g poetry@2.2.1
62+
poetry run python tools/generate_cli_documentation.py
63+
git diff --exit-code CLI_ARGS.md
6664
6765
analysis:
6866
name: "NEXT Analysis"
@@ -73,6 +71,11 @@ jobs:
7371
contents: write
7472
steps:
7573
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
74+
- uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 #v3.3.1
75+
with:
76+
install_args: "poetry@2.2.1"
77+
- run: |
78+
mise use -g poetry@2.2.1
7679
- uses: SonarSource/ci-github-actions/build-poetry@v1
7780
with:
7881
script: |
@@ -86,31 +89,33 @@ jobs:
8689
needs: [build]
8790
permissions:
8891
id-token: write
89-
contents: write
92+
contents: read
9093
strategy:
9194
matrix:
9295
python-version: ["3.9.18", "3.9.6", "3.10.13", "3.11.7", "3.12.1", "3.13.2"]
9396
steps:
9497
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
95-
- uses: SonarSource/ci-github-actions/build-poetry@v1
98+
- uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 #v3.3.1
9699
with:
100+
install_args: "poetry@2.2.1"
97101
python-version: ${{ matrix.python-version }}
98-
script: |
99-
poetry run pytest tests/
100-
sonar-platform: none
102+
- run: |
103+
mise use -g poetry@2.2.1
104+
poetry run pytest tests/
101105
102106
qa-windows:
103107
name: "Test Windows"
104108
runs-on: github-windows-latest-s
105109
needs: [build]
106110
steps:
107111
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
108-
- uses: SonarSource/ci-github-actions/build-poetry@v1
109-
with:
110-
script: |
111-
poetry run pytest tests/
112-
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
113-
sonar-platform: none
112+
- uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 #v3.3.1
113+
with:
114+
install_args: "poetry@2.2.1"
115+
- run: |
116+
mise use -g poetry@2.2.1
117+
poetry run pytest tests/
118+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
114119
115120
its:
116121
name: "Integration Tests"

0 commit comments

Comments
 (0)