Remove extra sources (leaving only xmippCore) #141
Workflow file for this run
This file contains 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: Build package in standalone version | |
on: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Install project | |
working-directory: ${{ github.workspace }} | |
run: | | |
pip install -e . | |
pip install -e .[test] | |
- name: Use CLI standalone | |
run: ${{ vars.MODULE_NAME }} -h | |
- name: Use CLI as Python module | |
run: python -m ${{ vars.MODULE_NAME }} -h | |
#- name: Check source code with Ruff | |
# run: python -m ruff check --config ./conf/ruff-src.toml | |
# | |
#- name: Check tests code with Ruff | |
# run: python -m ruff check --config ./conf/ruff-tests.toml | |
- name: Run unitary tests | |
env: | |
SCRIPT_PATH: ./scripts/run-tests.sh | |
run: | | |
chmod +x $SCRIPT_PATH | |
$SCRIPT_PATH unitary | |
- name: Run integration tests | |
env: | |
SCRIPT_PATH: ./scripts/run-tests.sh | |
run: | | |
chmod +x $SCRIPT_PATH | |
$SCRIPT_PATH integration | |
- name: Run e2e tests | |
env: | |
SCRIPT_PATH: ./scripts/run-tests.sh | |
run: | | |
chmod +x $SCRIPT_PATH | |
$SCRIPT_PATH e2e | |
- name: Generate report files | |
run: | | |
python -m coverage combine ./conf/coverage | |
python -m coverage xml | |
zip reports.zip coverage.xml reports.xml | |
- uses: actions/upload-artifact@v4 | |
if: matrix.python-version == '3.12' | |
with: | |
name: test-reports | |
path: reports.zip | |
sonar-scan: | |
needs: build-and-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: test-reports | |
path: ${{ github.workspace }} | |
- name: Unzip reports | |
run: unzip reports.zip | |
- name: SonarQube Scan | |
uses: SonarSource/sonarqube-scan-action@v4 | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |