Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
ci: change workflow order
Browse files Browse the repository at this point in the history
  • Loading branch information
trumully committed Apr 17, 2024
1 parent 3b73e1b commit 7b5daa2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/lint.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint
name: CI

on:
push:
Expand All @@ -24,10 +24,30 @@ jobs:
with:
python-version: 3.12.1
poetry-version: 1.8.2
- name: Run Linters

- name: Run Ruff & Pylint
run: |
poetry install --only-root
poetry run ruff check --fix src
poetry run pylint src
poetry run mypy src
poetry run black src
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Tests
run: |
poetry install --only-root
poetry run pytest

format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Black
run: |
poetry run black src
24 changes: 4 additions & 20 deletions .github/workflows/main.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Test & Release
name: Release

on:
workflow_run:
workflows: ["Lint"]
workflows:
- CI
types:
- completed
workflow_dispatch:
Expand All @@ -12,28 +13,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Python & Dependencies
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: 3.12.1
poetry-version: 1.8.2

- name: Run Tests
run: |
poetry install --only-root
poetry run pytest
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
permissions:
id-token: write
Expand Down

0 comments on commit 7b5daa2

Please sign in to comment.