diff --git a/.github/workflows/cygwin-test.yml b/.github/workflows/cygwin-test.yml index 808dc5608..ceb988cec 100644 --- a/.github/workflows/cygwin-test.yml +++ b/.github/workflows/cygwin-test.yml @@ -12,38 +12,61 @@ jobs: SHELLOPTS: igncr TMP: "/tmp" TEMP: "/tmp" + defaults: + run: + shell: bash.exe -eo pipefail -o igncr "{0}" steps: - name: Force LF line endings run: git config --global core.autocrlf input + - uses: actions/checkout@v4 with: fetch-depth: 9999 + - uses: cygwin/cygwin-install-action@v4 with: packages: python39 python39-pip python39-virtualenv git + + - name: Show python and git versions + run: | + set -x + /usr/bin/python --version + /usr/bin/git version + - 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)" - - name: Install dependencies and prepare tests - shell: bash.exe -eo pipefail -o igncr "{0}" + + - name: Prepare this repo for tests 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 + + - name: Further prepare git configuration for tests + run: | + set -x + /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: Update PyPA packages + run: | + set -x + /usr/bin/python -m pip install --upgrade pip setuptools wheel + + - name: Install project and test dependencies + run: | + set -x + /usr/bin/python -m pip install ".[test]" + - name: Test with pytest - shell: bash.exe -eo pipefail -o igncr "{0}" run: | + set -x /usr/bin/python -m pytest - continue-on-error: false diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index a6af507d1..9f15ceb2e 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -15,42 +15,70 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + include: + - experimental: false + - python-version: "3.12" + experimental: true steps: - uses: actions/checkout@v4 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 + allow-prereleases: ${{ matrix.experimental }} + + - name: Show python and git versions + run: | + set -x + python --version + git version + + - name: Prepare this repo for tests run: | set -x - python -m pip install --upgrade pip setuptools wheel - python --version; git --version git submodule update --init --recursive git fetch --tags --force - - pip install -r requirements.txt - pip install -r test-requirements.txt TRAVIS=yes ./init-tests-after-clone.sh + - name: Prepare git configuration for tests + run: | + set -x + 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: Update PyPA packages + run: | + set -x + + python -m pip install --upgrade pip + if pip freeze --all | grep --quiet '^setuptools=='; then + # Python prior to 3.12 ships setuptools. Upgrade it if present. + python -m pip install --upgrade setuptools + fi + python -m pip install --upgrade wheel + + - name: Install project and test dependencies + run: | + set -x + pip install ".[test]" + - 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 + # With new versions of mypy 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 - name: Test with pytest run: |