Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
AtticusZeller committed Jan 11, 2024
1 parent a0f5daa commit 80e4db2
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
python-version: [ "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Clone Repository
uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand All @@ -26,20 +25,17 @@ jobs:
uses: abatilo/[email protected]
with:
poetry-version: 1.7.1
- name: Install Dependencies
run: poetry install
- name: Run Tests
run: poetry run pytest
- name: Upload Coverage
uses: codecov/codecov-action@v1
- run: poetry install
- run: poetry run pytest
- uses: codecov/codecov-action@v1

changelog:
name: Generate Changelog
semantic-release:
name: Semantic Release and Publish
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: test
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.merged == true)
steps:
- name: Clone Repository
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.ATTICUS_PAT }}
Expand All @@ -48,18 +44,15 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

publish:
name: Publish to GitHub Releases

latest-changes:
name: Latest Changes
runs-on: ubuntu-latest
needs: [test, changelog]
if: github.event.pull_request.merged == true
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Clone Repository
uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.ATTICUS_PAT }}
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
- uses: docker://tiangolo/latest-changes:0.2.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 80e4db2

Please sign in to comment.