Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Added mypy checks on FreeBSD #370

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

env:
PDM_VERSION: '2.19.3' # Used by FreeBSD VM

jobs:
type-hinting:
if: |
Expand All @@ -63,3 +66,31 @@ jobs:
python-version: '3.11'
- name: Launch checks
run: tox run -f mypy

type-hinting-freebsd:
if: |
(github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'Bump version:'))
&& (github.event_name != 'pull_request' || github.event.pull_request.draft != true)
runs-on: ubuntu-24.04

name: type-hinting (freebsd-14)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Launch checks
uses: vmactions/freebsd-vm@v1
with:
release: '14.1'
usesh: true
prepare: |
set -e
pkg install -y curl git python311 py311-sqlite3
curl -sSL https://pdm-project.org/install-pdm.py | python3.11 - --version=${{ env.PDM_VERSION }} --path=/usr/local
pdm config check_update false
pdm config install.cache true
run: |
set -e
pdm install --frozen-lockfile --global --project=. --no-self --no-default --dev --group=tox
tox --version
tox --workdir /tmp/.tox run -e mypy-full
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,11 @@ jobs:
pdm config check_update false
pdm config install.cache true
run: |
set -e
pdm install --frozen-lockfile --global --project=. --no-self --no-default --dev --group=tox
tox --version
tox run -f ${{ matrix.tox_py }} -- ${{ env.PYTEST_VERBOSE_FLAG }}
tox run -f coverage
rm -rf .tox
find . -name '__pycache__' | xargs rm -rf
tox --workdir /tmp/.tox run -f ${{ matrix.tox_py }} -- ${{ env.PYTEST_VERBOSE_FLAG }}
tox --workdir /tmp/.tox run -f coverage
- name: Check files in workspace
if: always()
run: ls -lA
Expand Down