diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000..22a628e --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,20 @@ +name: Lint GitHub Actions workflows + +on: + push: + paths: + - '.github/workflows/**' + pull_request: + paths: + - '.github/workflows/**' + +jobs: + actionlint: + name: Actionlint + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Run actionlint + uses: reviewdog/action-actionlint@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c69fc3..ba8bcdb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - name: Get PR labels id: get_labels - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const prs = context.payload.workflow_run.pull_requests; @@ -70,21 +70,21 @@ jobs: echo "PR Labels: ${{ needs.auto-merge.outputs.prLabels }}" - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Install package run: | python -m pip install --upgrade pip setuptools wheel - pip install .[all] + pip install ".[all]" - name: Get version from package id: get_version run: | - VERSION=$(python -c "import pysdfgen; print(pysdfgen.__version__)") + VERSION="$(python -c "import pysdfgen; print(pysdfgen.__version__)")" echo "Detected version: $VERSION" - echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" - name: Tag and push release run: | @@ -101,7 +101,7 @@ jobs: ref: main submodules: true - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Install build tool @@ -121,10 +121,11 @@ jobs: strategy: matrix: # https://github.com/actions/runner-images - # Note: To test macOS-x with Intel architecture, - # you need to use the paid macOS-x-large runner, as macOS-x is grouped with ARM-based runners. - # https://docs.github.com/en/actions/concepts/runners/about-larger-runners - os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] + # Note: macos-13 is deprecated and will be retired by December 4, 2025 + # Using macos-15-intel for Intel x86_64 architecture testing + # macos-latest (ARM-based Apple Silicon) for general testing + # https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/ + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-15-intel, macos-latest] steps: - uses: actions/checkout@v4 @@ -150,7 +151,7 @@ jobs: runs-on: ubuntu-latest environment: pypi steps: - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.12" - uses: actions/download-artifact@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5cbf06..1cc8139 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,8 +15,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + - name: Set up Python 3.8 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install Formatting @@ -26,7 +26,7 @@ jobs: - name: Check Formatting run: | flake8 . - grep -rlIP '[^\x00-\x7F]' pysdfgen | grep '\.pyx\?' | sort > unicode.out; grep -rlI '# -\*- coding: \(utf-8\|latin-1\) -\*-' pysdfgen | grep '\.pyx\?' | sort > coding.out; comm -23 unicode.out coding.out > test_code.out; cat test_code.out; test \! -s test_code.out + grep -rlIP '[^\x00-\x7F]' pysdfgen | grep '\\.pyx\\?' | sort > unicode.out; grep -rlI '# -\\*- coding: \\(utf-8\\|latin-1\\) -\\*-' pysdfgen | grep '\\.pyx\\?' | sort > coding.out; comm -23 unicode.out coding.out > test_code.out; cat test_code.out; test ! -s test_code.out - name: Check isort run: | isort -c . @@ -41,7 +41,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Checkout submodules @@ -65,10 +65,6 @@ jobs: image: python:2.7.18-buster steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - name: Install APT On Linux run: | apt-get update -qq -y @@ -93,10 +89,11 @@ jobs: strategy: matrix: # https://github.com/actions/runner-images - # Note: To test macOS-x with Intel architecture, - # you need to use the paid macOS-x-large runner, as macOS-x is grouped with ARM-based runners. - # https://docs.github.com/en/actions/concepts/runners/about-larger-runners - os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] + # Note: macos-13 is deprecated and will be retired by December 4, 2025 + # Using macos-15-intel for Intel x86_64 architecture testing + # macos-latest (ARM-based Apple Silicon) for general testing + # https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/ + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-15-intel, macos-latest] steps: - uses: actions/checkout@v4