From a275afef834feeac175cea99d38820ce9dcfbe30 Mon Sep 17 00:00:00 2001 From: splitadricejas Date: Tue, 28 Sep 2021 11:20:45 -0300 Subject: [PATCH 1/4] workfow added --- .github/ci.yml | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/ci.yml diff --git a/.github/ci.yml b/.github/ci.yml new file mode 100644 index 00000000..d9496ebe --- /dev/null +++ b/.github/ci.yml @@ -0,0 +1,73 @@ +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + services: + redis: + image: redis + ports: + - 6379:6379 + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.6' + + - name: Install dependencies + run: | + pip install -U setuptools pip + pip install -e .[cpphash,redis,uwsgi] + + - name: Run tests + run: python setup.py test + + - name: SonarQube Scan (Push) + if: github.event_name == 'push' + uses: SonarSource/sonarcloud-github-action@v1.5 + env: + SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} + with: + projectBaseDir: . + args: > + -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} + -Dsonar.projectName=${{ github.event.repository.name }} + -Dsonar.projectKey=${{ github.event.repository.name }} + -Dsonar.python.coverage.reportPaths=coverage.xml + -Dsonar.c.file.suffixes=- + -Dsonar.cpp.file.suffixes=- + -Dsonar.objc.file.suffixes=- + -Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions" + -Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}" + + - name: SonarQube Scan (Pull Request) + if: github.event_name == 'pull_request' + uses: SonarSource/sonarcloud-github-action@v1.5 + env: + SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} + with: + projectBaseDir: . + args: > + -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} + -Dsonar.projectName=${{ github.event.repository.name }} + -Dsonar.projectKey=${{ github.event.repository.name }} + -Dsonar.python.coverage.reportPaths=coverage.xml + -Dsonar.c.file.suffixes=- + -Dsonar.cpp.file.suffixes=- + -Dsonar.objc.file.suffixes=- + -Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions" + -Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}" + -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} + -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} + -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} From ffc6296e90ab735643fb4e38490b1649fa7c249a Mon Sep 17 00:00:00 2001 From: splitadricejas Date: Tue, 28 Sep 2021 11:23:10 -0300 Subject: [PATCH 2/4] workflow dir created --- .github/{ => workflows}/ci.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/ci.yml (100%) diff --git a/.github/ci.yml b/.github/workflows/ci.yml similarity index 100% rename from .github/ci.yml rename to .github/workflows/ci.yml From 25bfb7a4f308d65fa2601b6560738036cb6f1f77 Mon Sep 17 00:00:00 2001 From: splitadricejas Date: Tue, 28 Sep 2021 11:57:38 -0300 Subject: [PATCH 3/4] name added --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9496ebe..0993efef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +name: ci on: push: branches: From dfc8e0c848a85e8046b50cd59c4999143afed3d9 Mon Sep 17 00:00:00 2001 From: splitadricejas Date: Tue, 28 Sep 2021 14:49:50 -0300 Subject: [PATCH 4/4] C files no-scan removed --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0993efef..2d5cc5ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,9 +46,6 @@ jobs: -Dsonar.projectName=${{ github.event.repository.name }} -Dsonar.projectKey=${{ github.event.repository.name }} -Dsonar.python.coverage.reportPaths=coverage.xml - -Dsonar.c.file.suffixes=- - -Dsonar.cpp.file.suffixes=- - -Dsonar.objc.file.suffixes=- -Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions" -Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}" @@ -64,9 +61,6 @@ jobs: -Dsonar.projectName=${{ github.event.repository.name }} -Dsonar.projectKey=${{ github.event.repository.name }} -Dsonar.python.coverage.reportPaths=coverage.xml - -Dsonar.c.file.suffixes=- - -Dsonar.cpp.file.suffixes=- - -Dsonar.objc.file.suffixes=- -Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions" -Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}" -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}