From 640a3f069fa955d258993996fb7fa4f4d640a18d Mon Sep 17 00:00:00 2001 From: docktermj Date: Fri, 27 Sep 2024 16:40:19 -0400 Subject: [PATCH] #85 Fix workflow configurations --- .github/workflows/pytest-darwin.yaml | 72 ------------------------- .github/workflows/pytest-linux.yaml | 73 -------------------------- .github/workflows/pytest-windows.yaml | 75 --------------------------- 3 files changed, 220 deletions(-) delete mode 100644 .github/workflows/pytest-darwin.yaml delete mode 100644 .github/workflows/pytest-linux.yaml delete mode 100644 .github/workflows/pytest-windows.yaml diff --git a/.github/workflows/pytest-darwin.yaml b/.github/workflows/pytest-darwin.yaml deleted file mode 100644 index b919e66..0000000 --- a/.github/workflows/pytest-darwin.yaml +++ /dev/null @@ -1,72 +0,0 @@ -name: pytest darwin - -on: [pull_request, workflow_dispatch] - -env: - PYTHONPATH: /Users/runner/work/template-python/template-python/src - SENZING_TOOLS_DATABASE_URL: sqlite3://na:na@nowhere/tmp/sqlite/G2C.db - -permissions: - contents: read - -jobs: - pytest-darwin: - name: "pytest Senzing: ${{ matrix.senzingapi-version }}; OS: ${{ matrix.os }}; Python ${{ matrix.python-version }}" - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-13] - # 3.8 and 3.9 are unsupported on the darwin runner - python-version: ["3.10", "3.11"] - senzingapi-version: [staging-v4] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --requirement requirements.txt - python -m pip install psutil pytest pytest-cov pytest-schema - - - if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' - name: Install python libraries for python 3.8, 3.9, and 3.10 - run: python -m pip install typing_extensions - - - name: Install Senzing API - uses: senzing-factory/github-action-install-senzing-api@v3 - with: - senzingapi-version: ${{ matrix.senzingapi-version }} - - - name: Copy /etc files - run: sudo cp testdata/senzing-license/g2.lic /opt/senzing/er/etc/g2.lic - - - name: Copy test database files - run: mkdir /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/G2C.db - - - name: Rename coverage file - env: - COVERAGE_FILE: "coverage.${{ matrix.python-version }}" - run: | - mv .coverage "$COVERAGE_FILE" - - - name: Store coverage file - uses: actions/upload-artifact@v4 - with: - name: coverage-${{ matrix.python-version }} - path: coverage.${{ matrix.python-version }} - - coverage: - name: Coverage - needs: pytest-darwin - permissions: - pull-requests: write - contents: write - uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v2 diff --git a/.github/workflows/pytest-linux.yaml b/.github/workflows/pytest-linux.yaml deleted file mode 100644 index d191d91..0000000 --- a/.github/workflows/pytest-linux.yaml +++ /dev/null @@ -1,73 +0,0 @@ -name: pytest linux - -on: [push, pull_request] - -env: - LD_LIBRARY_PATH: /opt/senzing/er/lib - PYTHONPATH: /home/runner/work/template-python/template-python/src - SENZING_TOOLS_DATABASE_URL: sqlite3://na:na@nowhere/tmp/sqlite/G2C.db - -permissions: - contents: read - -jobs: - pytest-linux: - name: "pytest Senzing: ${{ matrix.senzingapi-runtime-version }}; OS: ${{ matrix.os }}; Python ${{ matrix.python-version }}" - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - # python-version: ["3.8", "3.9", "3.10", "3.11"] - python-version: ["3.8", "3.11"] - senzingapi-runtime-version: [staging-v4] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --requirement requirements.txt - python -m pip install psutil pytest pytest-cov pytest-schema - - - if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' - name: Install python libraries for python 3.8, 3.9, and 3.10 - run: python -m pip install typing_extensions - - - name: Install Senzing API - uses: senzing-factory/github-action-install-senzing-api@v3 - with: - senzingapi-runtime-version: ${{ matrix.senzingapi-runtime-version }} - - - name: Copy /etc files - run: sudo cp testdata/senzing-license/g2.lic /etc/opt/senzing/g2.lic - - - name: Copy test database files - run: mkdir /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/G2C.db - - - name: Rename coverage file - env: - COVERAGE_FILE: "coverage.${{ matrix.python-version }}" - run: | - mv .coverage "$COVERAGE_FILE" - - - name: Store coverage file - uses: actions/upload-artifact@v4 - with: - name: coverage-${{ matrix.python-version }} - path: coverage.${{ matrix.python-version }} - - coverage: - name: Coverage - needs: pytest-linux - permissions: - pull-requests: write - contents: write - uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v2 diff --git a/.github/workflows/pytest-windows.yaml b/.github/workflows/pytest-windows.yaml deleted file mode 100644 index 34ad64e..0000000 --- a/.github/workflows/pytest-windows.yaml +++ /dev/null @@ -1,75 +0,0 @@ -name: pytest windows - -on: [pull_request, workflow_dispatch] - -env: - LD_LIBRARY_PATH: 'C:\Program Files\Senzing\er\lib' - PYTHONPATH: 'D:\a\template-python\template-python\src' - SENZING_TOOLS_DATABASE_URL: 'sqlite3://na:na@nowhere/C:\Temp\sqlite\G2C.db' - -permissions: - contents: read - -jobs: - pytest-windows: - name: "pytest Senzing: ${{ matrix.senzingapi-version }}; OS: ${{ matrix.os }}; Python ${{ matrix.python-version }}" - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] - senzingapi-version: [staging-v4] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --requirement requirements.txt - python -m pip install psutil pytest pytest-cov pytest-schema - - - if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' - name: Install python libraries for python 3.8, 3.9, and 3.10 - run: python -m pip install typing_extensions - - - name: Install Senzing API - uses: senzing-factory/github-action-install-senzing-api@v3 - with: - senzingapi-version: ${{ matrix.senzingapi-version }} - - - name: Add to "Path" environment variable - run: printf "C:\Program Files\Senzing\er\lib" | Out-File -FilePath "$env:GITHUB_PATH" -Encoding utf8 -Append - - - name: Copy /etc files - run: copy testdata/senzing-license/g2.lic "C:\Program Files\Senzing\er\etc\g2.lic" - - - name: Copy test database files - run: mkdir "C:\Temp\sqlite" && copy testdata/sqlite/G2C.db "C:\Temp\sqlite\G2C.db" - - - name: Rename coverage file - env: - COVERAGE_FILE: "coverage.${{ matrix.python-version }}" - run: | - Rename-Item -Path.coverage -NewName "$env:COVERAGE_FILE" - - - name: Store coverage file - uses: actions/upload-artifact@v4 - with: - name: coverage-${{ matrix.python-version }} - path: coverage.${{ matrix.python-version }} - - coverage: - name: Coverage - needs: pytest-windows - permissions: - pull-requests: write - contents: write - uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v2