diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..94d110b33 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,37 @@ +name: "CodeQL" +on: + workflow_dispatch: + #push: + # branches: [master] + #pull_request: + # branches: [master] + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["python"] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/.github/workflows/cygwin-test.yml b/.github/workflows/cygwin-test.yml deleted file mode 100644 index a1ecb6785..000000000 --- a/.github/workflows/cygwin-test.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: test-cygwin - -on: [push, pull_request, workflow_dispatch] - -jobs: - build: - runs-on: windows-latest - strategy: - fail-fast: false - env: - CHERE_INVOKING: 1 - SHELLOPTS: igncr - TMP: "/tmp" - TEMP: "/tmp" - - steps: - - name: Force LF line endings - run: git config --global core.autocrlf input - - uses: actions/checkout@v3 - with: - fetch-depth: 9999 - - uses: cygwin/cygwin-install-action@v4 - with: - packages: python39 python39-pip python39-virtualenv git - - name: Tell git to trust this repo - shell: bash.exe -eo pipefail -o igncr "{0}" - run: | - /usr/bin/git config --global --add safe.directory $(pwd) - /usr/bin/git config --global protocol.file.allow always - - name: Install dependencies and prepare tests - shell: bash.exe -eo pipefail -o igncr "{0}" - run: | - set -x - /usr/bin/python -m pip install --upgrade pip setuptools wheel - /usr/bin/python --version; /usr/bin/git --version - /usr/bin/git submodule update --init --recursive - /usr/bin/git fetch --tags - /usr/bin/python -m pip install -r requirements.txt - /usr/bin/python -m pip install -r test-requirements.txt - TRAVIS=yes ./init-tests-after-clone.sh - /usr/bin/git config --global user.email "travis@ci.com" - /usr/bin/git config --global user.name "Travis Runner" - # If we rewrite the user's config by accident, we will mess it up - # and cause subsequent tests to fail - cat test/fixtures/.gitconfig >> ~/.gitconfig - - name: Test with pytest - shell: bash.exe -eo pipefail -o igncr "{0}" - run: | - /usr/bin/python -m pytest - continue-on-error: false diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index c78a4053a..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Lint - -on: [push, pull_request, workflow_dispatch] - -jobs: - lint: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: "3.x" - - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml deleted file mode 100644 index 6d6c67952..000000000 --- a/.github/workflows/pythonpackage.yml +++ /dev/null @@ -1,70 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Python package - -on: [push, pull_request, workflow_dispatch] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 9999 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies and prepare tests - run: | - set -x - - python -m pip install --upgrade pip setuptools wheel - python --version; git --version - git submodule update --init --recursive - git fetch --tags - - pip install -r requirements.txt - pip install -r test-requirements.txt - TRAVIS=yes ./init-tests-after-clone.sh - - git config --global user.email "travis@ci.com" - git config --global user.name "Travis Runner" - # If we rewrite the user's config by accident, we will mess it up - # and cause subsequent tests to fail - cat test/fixtures/.gitconfig >> ~/.gitconfig - - - name: Check types with mypy - # With new versions of pypi new issues might arise. This is a problem if there is nobody able to fix them, - # so we have to ignore errors until that changes. - continue-on-error: true - run: | - set -x - mypy -p git - - - name: Tell git to trust this repo - run: | - /usr/bin/git config --global --add safe.directory $(pwd) - /usr/bin/git config --global protocol.file.allow always - - - name: Test with pytest - run: | - set -x - pytest - continue-on-error: false - - - name: Documentation - run: | - set -x - pip install -r doc/requirements.txt - make -C doc html