From df1e7812b150ad9f747f6bcd4e535e45a7b7f7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Wed, 26 Oct 2022 22:20:49 +0200 Subject: [PATCH] TST: switch CI to Python 3.11, and other test housekeeping tasks --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++------ .github/workflows/type-checking.yaml | 34 ------------------- 2 files changed, 39 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/type-checking.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 375601e4..78d43b98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,15 +12,14 @@ jobs: tests: strategy: matrix: - os: [ - ubuntu-latest, - macos-latest, - windows-latest, - ] - python-version: [ - '3.8', - '3.10', - ] + os: + - ubuntu-latest + - macos-latest + - windows-latest + python-version: + - '3.8' + - '3.11' + runs-on: ${{ matrix.os }} timeout-minutes: 30 @@ -34,7 +33,36 @@ jobs: - name: Setup package run: | python -m pip install --upgrade pip - python -m pip install .[dev] + python -m pip install ".[dev]" - name: Run tests run: | - pytest + pytest --color=yes + + + type-check: + runs-on: ubuntu-latest + name: type check + + concurrency: + group: ${{ github.ref }}-dev + cancel-in-progress: true + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + # Match minimal supported Python version + # to make sure we're not using unparseable syntax + python-version: '3.8' + + - name: Build + run: | + python3 -m pip install --upgrade pip + python3 -m pip install .[typecheck] + + - name: Run mypy + run: mypy amical diff --git a/.github/workflows/type-checking.yaml b/.github/workflows/type-checking.yaml deleted file mode 100644 index 37ea7a2c..00000000 --- a/.github/workflows/type-checking.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: type checking - -on: - push: - branches: - - main - pull_request: - paths-ignore: - - "doc/**" - - README.md - -jobs: - build: - runs-on: ubuntu-latest - name: mypy - timeout-minutes: 60 - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - - name: Build AMICAL + type check deps - run: | - python -m pip install --upgrade pip - python -m pip install .[typecheck] - - - name: Run mypy - run: mypy amical