From b9dfade5ec51fc68833f5a6d93bbf9b39af0624b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Alexandre=20C=C3=B4t=C3=A9?= Date: Mon, 5 Jan 2026 10:10:52 -0500 Subject: [PATCH 1/3] Update Github Actions --- .github/workflows/codeql.yml | 98 +++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 59 +++++++++++--------- .github/workflows/test_pypi.yml | 6 +- .github/workflows/tests.yml | 38 +++++++++++++ .gitignore | 3 + .pre-commit-config.yaml | 6 ++ docs/source/conf.py | 2 - requirements-dev.txt | 36 ++++++++++++ setup.py | 1 + 9 files changed, 219 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/tests.yml create mode 100644 .pre-commit-config.yaml create mode 100644 requirements-dev.txt diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..e82049e6 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,98 @@ +# 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" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '20 14 * * 1' + +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 + + strategy: + fail-fast: false + matrix: + include: + - language: python + build-mode: none + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', '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}}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5635c88f..7dd7338a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,10 +2,6 @@ name: Build and upload to PyPI on: workflow_dispatch: - pull_request: - push: - branches: - - main release: types: - published @@ -20,11 +16,6 @@ jobs: matrix: include: # Linux 64 bit manylinux2014 - - os: ubuntu-latest - python: '3.9' - cp: '39' - platform_id: manylinux_x86_64 - manylinux_image: manylinux2014 - os: ubuntu-latest python: '3.10' cp: '310' @@ -40,46 +31,64 @@ jobs: cp: '312' platform_id: manylinux_x86_64 manylinux_image: manylinux2014 + - os: ubuntu-latest + python: '3.13' + cp: '313' + platform_id: manylinux_x86_64 + manylinux_image: manylinux2014 + - os: ubuntu-latest + python: '3.14' + cp: '314' + platform_id: manylinux_x86_64 + manylinux_image: manylinux2014 # MacOS x86_64 - - os: macos-13 - python: '3.9' - cp: '39' - platform_id: macosx_x86_64 - - os: macos-13 + - os: macos-latest-large python: '3.10' cp: '310' platform_id: macosx_x86_64 - - os: macos-13 + - os: macos-latest-large python: '3.11' cp: '311' platform_id: macosx_x86_64 - - os: macos-13 + - os: macos-latest-large python: '3.12' cp: '312' platform_id: macosx_x86_64 + - os: macos-latest-large + python: '3.13' + cp: '313' + platform_id: macosx_x86_64 + - os: macos-latest-large + python: '3.14' + cp: '314' + platform_id: macosx_x86_64 # MacOS arm64 - - os: macos-14 - python: '3.9' - cp: '39' - platform_id: macosx_arm64 - - os: macos-14 + - os: macos-latest python: '3.10' cp: '310' platform_id: macosx_arm64 - - os: macos-14 + - os: macos-latest python: '3.11' cp: '311' platform_id: macosx_arm64 - - os: macos-14 + - os: macos-latest python: '3.12' cp: '312' platform_id: macosx_arm64 + - os: macos-latest + python: '3.13' + cp: '313' + platform_id: macosx_arm64 + - os: macos-latest + python: '3.14' + cp: '314' + platform_id: macosx_arm64 steps: - name: Checkout TextWorld - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Build Wheel uses: pypa/cibuildwheel@v2.22.0 @@ -127,7 +136,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python uses: actions/setup-python@v5 with: diff --git a/.github/workflows/test_pypi.yml b/.github/workflows/test_pypi.yml index 517b6161..afdc0877 100644 --- a/.github/workflows/test_pypi.yml +++ b/.github/workflows/test_pypi.yml @@ -12,10 +12,10 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-13, macos-14] - python: ['3.9', '3.10', '3.11', '3.12', '3.13'] + os: [ubuntu-latest, macos-latest, macos-large] + python: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Use Python ${{ matrix.python }} uses: actions/setup-python@v5 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..a48ea25e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,38 @@ +name: "Run tests and coverage" + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, macos-latest-large] + python: ['3.10', '3.11', '3.12', '3.13', '3.14'] + steps: + - uses: actions/checkout@v5 + - name: Use Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Install dependencies (Linux) + run: sudo apt update && sudo apt install -y --no-install-recommends graphviz + if: startsWith(matrix.os, 'ubuntu') + + - name: Install dependencies (MacOS) + run: brew install graphviz + if: startsWith(matrix.os, 'macos') + + - name: Install TextWorld from source + run: | + python -m pip install --upgrade pip + pip install -e .[dev] + - name: Run tests + run: | + pytest --cov=textworld --cov-report=term-missing --fail-under=85 tests/ textworld/ diff --git a/.gitignore b/.gitignore index c2aaddf5..91558630 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ build/* gen_games*/ experiments*/ /textworld/thirdparty/inform7-6M62 +/textworld/thirdparty/frotz gameinfo.dbg textworld_data/ Inform/ @@ -26,3 +27,5 @@ tmp/* /wheelhouse docs/build docs/src +*.code-workspace +.coverage \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..4abfe4d0 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: +- repo: https://github.com/pycqa/flake8 + rev: 7.0.0 + hooks: + - id: flake8 + exclude: ^textworld/thirdparty/ diff --git a/docs/source/conf.py b/docs/source/conf.py index a4cac70e..a6b589e0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -16,9 +16,7 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -import os import sphinx_rtd_theme -import subprocess # -- Project information ----------------------------------------------------- diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000..e869ea36 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,36 @@ +# Main dependencies +numpy>=1.14.5 +tqdm>=4.17.1 +cffi>=1.0.0 +networkx>=2 +more_itertools +tatsu==5.8.3 +hashids>=1.2.0 +jericho>=2.2.0 +mementos>=1.3.1 +termcolor + +# For advanced prompt +prompt_toolkit + +# For visualization +pybars3>=0.9.3 +flask>=1.0.2 +selenium>=3.12.0,<4.3 +greenlet>=0.4.13 +gevent>=1.3.5 +pillow>=5.1.0 +plotly>=4.0.0,<6.0.0 +pydot>=1.2.4 +psutil +matplotlib + +# For using PddlEnv (needed for ALFWorld) +fast-downward-textworld + +# For testing +pytest +pytest-asyncio +pytest-cov +pytest-xdist +pytest-timeout diff --git a/setup.py b/setup.py index cc66352e..e17f018e 100644 --- a/setup.py +++ b/setup.py @@ -70,5 +70,6 @@ def run(self): 'vis': open('requirements-vis.txt').readlines(), 'pddl': open('requirements-pddl.txt').readlines(), 'full': open('requirements-full.txt').readlines(), + 'dev': open('requirements-dev.txt').readlines(), } ) From fa8e13f2043222bb5fe60889c955c154fae973cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Alexandre=20C=C3=B4t=C3=A9?= Date: Mon, 5 Jan 2026 10:30:02 -0500 Subject: [PATCH 2/3] Remove Azure pipelines --- .azure/pipelines/linux-template.yml | 46 ------------------------- .azure/pipelines/macos-template.yml | 39 ---------------------- .azure/pipelines/prerelease.yml | 52 ----------------------------- .azure/pipelines/release.yml | 28 ---------------- .azure/pipelines/security.yml | 15 --------- .azure/pipelines/tests.yml | 34 ------------------- 6 files changed, 214 deletions(-) delete mode 100644 .azure/pipelines/linux-template.yml delete mode 100644 .azure/pipelines/macos-template.yml delete mode 100644 .azure/pipelines/prerelease.yml delete mode 100644 .azure/pipelines/release.yml delete mode 100644 .azure/pipelines/security.yml delete mode 100644 .azure/pipelines/tests.yml diff --git a/.azure/pipelines/linux-template.yml b/.azure/pipelines/linux-template.yml deleted file mode 100644 index 0e8f256d..00000000 --- a/.azure/pipelines/linux-template.yml +++ /dev/null @@ -1,46 +0,0 @@ -jobs: - - ${{ each vmImage in parameters.vmImages }}: - - ${{ each pythonVersion in parameters.pythonVersions }}: - - job: - displayName: ${{ format('OS:{0} PY:{1}', vmImage, pythonVersion) }} - pool: - vmImage: ${{ vmImage }} - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '${{ pythonVersion }}' - - - script: | - sudo apt update && sudo apt install -y --no-install-recommends graphviz - displayName: 'Install dependencies' - - - script: | - pip install --pre "textworld[full]" - condition: eq(variables.installFromSource, false) - displayName: 'Install a prerelease of TextWorld from PyPi' - - - script: | - setup.sh - pip install -r requirements-full.txt - pip install -e . - condition: eq(variables.installFromSource, true) - displayName: 'Install TextWorld from source' - - - script: | - pip install pytest pytest-azurepipelines pytest-cov - pytest --durations=10 --junitxml=junit/test-results.xml --cov=textworld --cov-report=xml --cov-report=html tests/ textworld/ - displayName: 'Run tests' - - - script: | - pip install codecov - for i in {1..5}; do codecov --required && break || sleep 30; done - env: - CODECOV_TOKEN: $(TEXTWORLD_CODECOV_TOKEN) - displayName: 'Publish coverage on Codecov' - - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: Cobertura - summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml' - reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov' diff --git a/.azure/pipelines/macos-template.yml b/.azure/pipelines/macos-template.yml deleted file mode 100644 index 0a3903ca..00000000 --- a/.azure/pipelines/macos-template.yml +++ /dev/null @@ -1,39 +0,0 @@ -jobs: - - ${{ each vmImage in parameters.vmImages }}: - - ${{ each pythonVersion in parameters.pythonVersions }}: - - job: - displayName: ${{ format('OS:{0} PY:{1}', vmImage, pythonVersion) }} - pool: - vmImage: ${{ vmImage }} - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '${{ pythonVersion }}' - - - script: | - brew install graphviz - displayName: 'Install dependencies' - - - script: | - pip install --pre --use-pep517 textworld[full] - condition: eq(variables.installFromSource, false) - displayName: 'Install a prerelease of TextWorld from PyPi' - - - script: | - setup.sh - pip install -r requirements-full.txt - pip install -e . - condition: eq(variables.installFromSource, true) - displayName: 'Install TextWorld from source' - - - script: | - pip install pytest pytest-azurepipelines pytest-cov - pytest --junitxml=junit/test-results.xml --cov=textworld --cov-report=xml --cov-report=html tests/ textworld/ - displayName: 'Run tests' - - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: Cobertura - summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml' - reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov' diff --git a/.azure/pipelines/prerelease.yml b/.azure/pipelines/prerelease.yml deleted file mode 100644 index d37c67a5..00000000 --- a/.azure/pipelines/prerelease.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Release code in the main branch to PyPi as a release candidate - -stages: -- stage: Prerelease_on_PyPi - jobs: - - job: - pool: - vmImage: 'ubuntu-latest' - - steps: - - task: UsePythonVersion@0 - displayName: 'Use Python' - - - script: | - pip install twine - - # Build the python distribution from source - - script: | - pip install -r requirements.txt - TEXTWORLD_PRERELEASE=true ./tools/package.sh - - - task: TwineAuthenticate@1 - displayName: 'Twine Authenticate' - inputs: - pythonUploadServiceConnection: pypi - - # Use command line script to 'twine upload', use -r to pass the repository name and --config-file to pass the environment variable set by the authenticate task. - - script: | - python -m twine upload -r pypi --config-file $(PYPIRC_PATH) dist/textworld-* - -- stage: Test_library - variables: - - name: installFromSource - value: false - readonly: true - jobs: - - template: linux-template.yml - parameters: - vmImages: [ 'ubuntu-20.04' ] - pythonVersions: [ '3.9' ] - - template: linux-template.yml - parameters: - vmImages: [ 'ubuntu-latest' ] - pythonVersions: [ '3.12' ] - - template: macos-template.yml - parameters: - vmImages: [ 'macOS-11' ] - pythonVersions: [ '3.9' ] - - template: macos-template.yml - parameters: - vmImages: [ 'macOS-latest' ] - pythonVersions: [ '3.12' ] \ No newline at end of file diff --git a/.azure/pipelines/release.yml b/.azure/pipelines/release.yml deleted file mode 100644 index 67d56b8a..00000000 --- a/.azure/pipelines/release.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Release code in the main branch to PyPi - -jobs: -- job: - displayName: Release_on_PyPi - pool: - vmImage: 'ubuntu-latest' - - steps: - - task: UsePythonVersion@0 - displayName: 'Use Python' - - - script: | - pip install twine - - # Build the python distribution from source - - script: | - pip install -r requirements.txt - ./tools/package.sh - - - task: TwineAuthenticate@1 - displayName: 'Twine Authenticate' - inputs: - pythonUploadServiceConnection: pypi - - # Use command line script to 'twine upload', use -r to pass the repository name and --config-file to pass the environment variable set by the authenticate task. - - script: | - python -m twine upload -r pypi --config-file $(PYPIRC_PATH) dist/textworld-* diff --git a/.azure/pipelines/security.yml b/.azure/pipelines/security.yml deleted file mode 100644 index 6f9bf848..00000000 --- a/.azure/pipelines/security.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Run the Component Governance Detection task - -trigger: -- main - -pool: - vmImage: 'ubuntu-latest' - -steps: -- task: ComponentGovernanceComponentDetection@0 - inputs: - scanType: 'Register' - verbosity: 'Verbose' - alertWarningLevel: 'High' - failOnAlert: true \ No newline at end of file diff --git a/.azure/pipelines/tests.yml b/.azure/pipelines/tests.yml deleted file mode 100644 index 27bfce45..00000000 --- a/.azure/pipelines/tests.yml +++ /dev/null @@ -1,34 +0,0 @@ -trigger: -- main - -stages: -- stage: Test - variables: - - name: installFromSource - value: true - readonly: true - jobs: - - template: linux-template.yml - parameters: - vmImages: [ 'ubuntu-latest' ] - pythonVersions: [ '3.9' ] - - template: linux-template.yml - parameters: - vmImages: [ 'ubuntu-latest' ] - pythonVersions: [ '3.10' ] - - template: linux-template.yml - parameters: - vmImages: [ 'ubuntu-latest' ] - pythonVersions: [ '3.11' ] - - template: linux-template.yml - parameters: - vmImages: [ 'ubuntu-latest' ] - pythonVersions: [ '3.12' ] - - template: macos-template.yml - parameters: - vmImages: [ 'macOS-latest' ] - pythonVersions: [ '3.9' ] - - template: macos-template.yml - parameters: - vmImages: [ 'macOS-latest' ] - pythonVersions: [ '3.12' ] From f49cd963a80c0a4aab37a9d8abcdac323161a89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Alexandre=20C=C3=B4t=C3=A9?= Date: Mon, 5 Jan 2026 10:34:27 -0500 Subject: [PATCH 3/3] Fix --- .github/workflows/codeql.yml | 98 ------------------------------------ .github/workflows/pep8.yml | 8 +-- .github/workflows/tests.yml | 2 +- 3 files changed, 5 insertions(+), 103 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index e82049e6..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,98 +0,0 @@ -# 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" - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - schedule: - - cron: '20 14 * * 1' - -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 - - strategy: - fail-fast: false - matrix: - include: - - language: python - build-mode: none - # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', '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}}" diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index f6fd2989..f2dac956 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -4,11 +4,11 @@ jobs: run: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Setup Python 3.7 - uses: actions/setup-python@master + - uses: actions/checkout@v5 + - name: Setup Python + uses: actions/setup-python@v5 with: - version: 3.7 + python-version: '3.12' - name: flake8 run: | pip install flake8 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a48ea25e..a7236d35 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,4 +35,4 @@ jobs: pip install -e .[dev] - name: Run tests run: | - pytest --cov=textworld --cov-report=term-missing --fail-under=85 tests/ textworld/ + pytest -n 16 --cov=textworld --cov-report=term-missing --cov-fail-under=85 tests/ textworld/