Skip to content

Commit

Permalink
Add publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielguarisa committed Feb 5, 2024
1 parent 850acfb commit 33a6cb8
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Checks
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '**/*.md'
- '**/*.png'
- '**/*.json'

jobs:
test:
permissions:
pull-requests: write
timeout-minutes: 10
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
python-version: [3.9, 3.11]
poetry-version: [1.4.2]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: make init
- name: Run tests
run: make tests
- name: Pytest coverage comment
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: pytest-coverage.txt
junitxml-path: pytest.xml
badge-title: coverage
create-new-comment: true
code-quality:
timeout-minutes: 10
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
python-version: [3.11]
poetry-version: [1.4.2]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: make init
- name: Run style checks
run: make formatting
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release
on:
release:
types:
- created

jobs:
publish:
strategy:
fail-fast: false
matrix:
python-version: [3.11]
poetry-version: [1.4.2]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Publish
run:
poetry publish --build

0 comments on commit 33a6cb8

Please sign in to comment.