fix: workflow files configuration #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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@v4 |