Skip to content

Upgrade to SonarQube 10.7 #142

Upgrade to SonarQube 10.7

Upgrade to SonarQube 10.7 #142

Workflow file for this run

---
name: Docker Image CI
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
env:
CODE: "PROJ1"
RULES: "+csharpsquid:S104;-typescript:S1301;+Web:UnclosedTagCheck"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- env:
IMAGE_EDITION: community
- env:
IMAGE_EDITION: developer
steps:
- uses: actions/checkout@v4
- name: Build and run container image
run: |
docker build --build-arg="IMAGE_EDITION=${{ matrix.env.IMAGE_EDITION }}" -t ci .
docker run -e PROJECT_CODE="${{ env.CODE }}" -e PROJECT_RULES="${{ env.RULES }}" -v $(pwd)/tests:/opt/sonarqube/test -d --name ci ci
- name: Wait for Sonar instance to start
# profile for language 'web' is the last; assume everything is working if we got this far
run: docker logs -f ci |& sed "/Current profile for language 'web' is 'Sonar way'/ q"
timeout-minutes: 3
- name: Install test requirements
run: |
docker exec -u 0:0 ci apt-get update
docker exec -u 0:0 ci apt-get install -y python3 python3-pip
docker exec -u 0:0 ci pip3 install -Ur /opt/sonarqube/test/requirements.txt
- name: Run tests
run: docker exec -e PROJECT_CODE="${{ env.CODE }}" -e PROJECT_RULES="${{ env.RULES }}" ci python3 -m unittest -v
- name: Stop the container
run: docker stop ci