From b07b19d16f28696e74ed82f2209ca88a79cf707c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Thu, 1 Aug 2024 19:28:26 +0200 Subject: [PATCH] update CI --- .github/workflows/main.yml | 37 +++++++++++++++++++++---------------- pyproject.toml | 4 ++-- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f18d32..41555f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,34 +12,33 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -env: - # needed by coveralls - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - jobs: source_check: name: source check runs-on: ubuntu-latest - strategy: - fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python 3.9 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.9 - name: Install dependencies run: | python -m pip install --upgrade pip - pip install --editable .[check] + pip install --editable .[check,test] + pip install "coveralls>=3.0.0" - name: black check run: | python -m black --check --diff --color . + - name: black preview + run: | + python -m black --preview --diff --color . + - name: isort check run: | python -m isort --check --diff --color . @@ -48,22 +47,29 @@ jobs: run: | python -m pylint src/anaflow/ + - name: coveralls check + run: | + python -m pytest --cov anaflow --cov-report term-missing -v tests/ + python -m coveralls --service=github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build_sdist: name: sdist on ${{ matrix.os }} with py ${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + os: [ubuntu-latest, windows-latest, macos-13] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: '0' - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -76,13 +82,12 @@ jobs: - name: Run tests run: | python -m pytest --cov anaflow --cov-report term-missing -v tests/ - python -m coveralls --service=github - name: Build sdist run: | python -m build - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' with: path: dist @@ -92,7 +97,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: artifact path: dist diff --git a/pyproject.toml b/pyproject.toml index 09a9d75..4daeaef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,9 +54,9 @@ doc = [ ] test = ["pytest-cov>=3"] check = [ - "black>=23,<24", + "black>=24,<25", "isort[colors]<6", - "pylint<3", + "pylint", ] [project.urls]