Skip to content
Merged
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
70 changes: 61 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@ name: CI

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
tests:
lint:
name: Lint / format
runs-on: ubuntu-latest

steps:
- name: Check out repository
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
Expand All @@ -21,17 +32,58 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements-dev.txt

- name: Lint with ruff
- name: Run Ruff
run: ruff check .

- name: Check formatting
- name: Run Black
run: black --check .

- name: Run isort
run: isort --check-only .

type-check:
name: Type check
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
black --check .
isort --check-only .
python -m pip install --upgrade pip
pip install -r requirements-dev.txt

- name: Type check
- name: Run mypy
run: mypy src

- name: Run tests
test:
name: Test (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pytest --cov=veracrypt --cov-report=term-missing --cov-fail-under=80
python -m pip install --upgrade pip
pip install -r requirements-dev.txt

- name: Run tests
run: pytest --cov=veracrypt --cov-report=term-missing --cov-fail-under=80