Skip to content

fix: define sonar sources and tests for args #16

fix: define sonar sources and tests for args

fix: define sonar sources and tests for args #16

Workflow file for this run

name: PR-verify
on:
pull_request:
env:
NODE_VERSION: '20.x'
PYTHON_VERSION: '3.11'
jobs:
verify:
name: Verify
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Create and activate Python virtual environment
run: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: |
source venv/bin/activate
npm ci
- name: Build
run: npm run build
- name: Run tests
run: npm test
- name: SonarCloud Scan
if: ${{ vars.IS_INDITEXTECH_REPO == 'true' }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectKey=mcp-server-simulator-ios-idb
-Dsonar.organization=com.inditex
-Dsonar.sources=src
-Dsonar.tests=src/**/__tests__
-Dsonar.typescript.lcov.reportPaths=coverage/lcov.info
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
repo-linter:
name: Repo Linter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Execute repolinter
run: |
npm install -g [email protected]
repolinter lint .
reuse-compliance:
name: REUSE Compliance
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v5