Skip to content

Commit

Permalink
CI: Added mypy checks on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
francis-clairicia committed Oct 22, 2024
1 parent 640a3a1 commit 7bbe780
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
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

0 comments on commit 7bbe780

Please sign in to comment.