diff --git a/.github/dependency_review.yml b/.github/dependency_review.yml index dfec285..e88e8b1 100644 --- a/.github/dependency_review.yml +++ b/.github/dependency_review.yml @@ -20,4 +20,4 @@ license-check: true vulnerability-check: true allow-dependencies-licenses: - 'pkg:pypi/PyGithub@2.2.0' - - 'pkg:pypi/psycopg2-binary' \ No newline at end of file + - 'pkg:pypi/psycopg2-binary' diff --git a/.github/workflows/check_code_standard.yml b/.github/workflows/check_code_standard.yml index 1727cbf..01dd797 100644 --- a/.github/workflows/check_code_standard.yml +++ b/.github/workflows/check_code_standard.yml @@ -11,8 +11,7 @@ jobs: matrix: python_version: ['3.10', '3.13'] uses: intel/mfd/.github/workflows/check_code_standard.yml@main - secrets: - GH_TOKEN: ${{ secrets.GH_TOKEN }} with: REPOSITORY_NAME: ${{ github.event.pull_request.head.repo.full_name }} BRANCH_NAME: ${{ github.head_ref }} + PYTHON_VERSION: ${{ matrix.python_version }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 4c43daf..43ace53 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,15 +1,4 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL Advanced" +name: CodeQL Advanced on: pull_request: @@ -18,81 +7,11 @@ on: branches: [ "main" ] jobs: - analyze: - name: Analyze (${{ matrix.language }}) - # Runner size impacts CodeQL analysis time. To learn more, please see: - # - https://gh.io/recommended-hardware-resources-for-running-codeql - # - https://gh.io/supported-runners-and-hardware-resources - # - https://gh.io/using-larger-runners (GitHub.com only) - # Consider using larger runners or machines with greater resources for possible analysis time improvements. - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - permissions: - # required for all workflows - security-events: write - - # required to fetch internal or private CodeQL packs - packages: read - - # only required for workflows in private repositories - actions: read - contents: read - + codeql_analysis: strategy: fail-fast: false matrix: - include: - - language: actions - build-mode: none - - language: python - build-mode: none - # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' - # Use `c-cpp` to analyze code written in C, C++ or both - # Use 'java-kotlin' to analyze code written in Java, Kotlin or both - # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both - # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, - # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. - # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how - # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Add any setup steps before running the `github/codeql-action/init` action. - # This includes steps like installing compilers or runtimes (`actions/setup-node` - # or others). This is typically only required for manual builds. - # - name: Setup runtime (example) - # uses: actions/setup-example@v1 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - build-mode: ${{ matrix.build-mode }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - # If the analyze step fails for one of the languages you are analyzing with - # "We were unable to automatically build your code", modify the matrix above - # to set the build mode to "manual" for that language. Then modify this step - # to build your code. - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - if: matrix.build-mode == 'manual' - shell: bash - run: | - echo 'If you are using a "manual" build mode for one or more of the' \ - 'languages you are analyzing, replace this with the commands to build' \ - 'your code, for example:' - echo ' make bootstrap' - echo ' make release' - exit 1 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" + language: ['actions', 'python'] + uses: intel/mfd/.github/workflows/codeql.yml@main + with: + LANGUAGE: ${{ matrix.language }} diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 9d8701e..ec87d6e 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -15,11 +15,7 @@ jobs: os: [ubuntu-latest, windows-latest] python_version: ['3.10', '3.13'] uses: intel/mfd/.github/workflows/run_tests.yml@main - secrets: - GH_TOKEN: ${{ secrets.GH_TOKEN }} with: - REPOSITORY_NAME: ${{ github.event.pull_request.head.repo.full_name }} - BRANCH_NAME: ${{ github.head_ref }} PYTHON_VERSION: ${{ matrix.python_version }} RUNS_ON: ${{ matrix.os }} PROJECT_NAME: 'mfd-const' diff --git a/requirements-dev.txt b/requirements-dev.txt index 35ce018..6191889 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,4 +2,4 @@ # Put additional dependencies needed for development here -mfd-code-quality >= 1.2.0, < 2 \ No newline at end of file +mfd-code-quality >= 1.4.1, < 2 diff --git a/requirements-test.txt b/requirements-test.txt index f561012..33f1ffa 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt # Ensure tests dependencies are automatically included # Put dependencies required for testing the module here -pytest ~= 8.4 +pytest >= 9.0.3, < 10 pytest-mock ~= 3.14 coverage ~= 7.3.0 \ No newline at end of file