CI: Update codeql.yml to ignore insignificant changes #119
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: ["master"] | |
paths-ignore: | |
- "**/README.md" | |
- "LICENSE" | |
- "ChangeLog" | |
pull_request: | |
branches: ["*"] | |
paths-ignore: | |
- "**/README.md" | |
- "LICENSE" | |
- "ChangeLog" | |
workflow_dispatch: | |
concurrency: | |
group: CI-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
name: "${{ matrix.system.os }}, Py${{ matrix.python-version }}" | |
runs-on: "${{ matrix.system.os }}-latest" | |
continue-on-error: ${{ matrix.system.can-fail }} | |
strategy: | |
matrix: | |
system: | |
- {os: ubuntu, can-fail: false} | |
- {os: windows, can-fail: true} | |
- {os: macos, can-fail: true} | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
- "3.8" | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
cache: "pip" | |
- name: "Set up TEST_ERROR_DIR" | |
shell: bash | |
run: | | |
mkdir test_errors | |
if [ "${{ runner.os }}" = "Windows" ]; then | |
echo "TEST_ERROR_DIR=$(cygpath -w $(realpath ./test_errors))" >> "$GITHUB_ENV" | |
else | |
echo "TEST_ERROR_DIR=$(pwd -P)/test_errors" >> "$GITHUB_ENV" | |
fi | |
- name: "Install graphviz (Linux)" | |
if: runner.os == 'linux' | |
run: sudo apt install graphviz | |
- name: "Install graphviz (Windows)" | |
if: runner.os == 'windows' | |
run: choco install graphviz --ignore-http-cache | |
- name: "Install graphviz (macOS)" | |
if: runner.os == 'macos' | |
run: brew install graphviz | |
- name: "Install Python dependencies" | |
run: python -m pip install pip==24.0.0 setuptools==68.0.0 wheel==0.42.0 tox==4.8.0 tox-gh==1.3.1 | |
- name: "Setup tests" | |
run: tox -vv --notest | |
- name: "Run tests" | |
run: tox --skip-pkg-install | |
- name: "Prepare error artifacts" | |
if: ${{ failure() }} | |
run: cp test/compare_images.sh "${{ env.TEST_ERROR_DIR }}" | |
- name: "Publish error artifacts" | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: test-errors-${{ runner.os }}-${{ matrix.python-version }} | |
path: ${{ env.TEST_ERROR_DIR }} | |
if-no-files-found: ignore |