Skip to content

Commit

Permalink
Add release step in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Feb 13, 2025
1 parent fb883dc commit 9470c02
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 33 deletions.
46 changes: 44 additions & 2 deletions .github/workflows/tests.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: CI

on:
push:
Expand All @@ -12,6 +12,32 @@ env:
FORCE_COLOR: 1

jobs:
lint:
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: '3.13'
- name: Install dependencies
run: uv sync --group lint

- name: Run Ruff formatter
run: make format-diff

- name: Run Ruff linter
run: make lint-github

- name: Run Pyright
run: make typecheck

- name: Run pre-commit
uses: [email protected]
with:
extra_args: --all-files --verbose

test:
name: Run tests
strategy:
Expand All @@ -20,6 +46,7 @@ jobs:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -126,7 +153,6 @@ jobs:
name: coverage-html
path: htmlcov


coverage-pr-comment:
needs: coverage-combine
runs-on: ubuntu-latest
Expand Down Expand Up @@ -155,3 +181,19 @@ jobs:
with:
name: python-coverage-comment-action
path: python-coverage-comment-action.txt

check:
if: always()
outputs:
result: ${{ steps.all-green.outputs.result }}
needs:
- lint
- test
- docs
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
id: all-green
with:
jobs: ${{ toJSON(needs) }}
4 changes: 2 additions & 2 deletions .github/workflows/coverage_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Post coverage comment

on:
workflow_run:
workflows: ["CI"]
workflows: [CI]
types:
- completed

jobs:
test:
name: Run tests & display coverage
name: Display coverage
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
permissions:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/lint.yml

This file was deleted.

Empty file added HISTORY.md
Empty file.

0 comments on commit 9470c02

Please sign in to comment.