Skip to content

Commit

Permalink
build: add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
waza-ari committed Jan 3, 2024
1 parent 8067da2 commit 7801a11
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PyTest Tests

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-22.04
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.6.1
- name: Install dependencies
run: poetry install --with dev
- name: Run pytest
run: pytest --junitxml=junit/test-results.xml --cov=easyverein --cov-report=xml --cov-report=html
8 changes: 8 additions & 0 deletions .github/workflows/python-lint.properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "Python Linting",
"description": "Workflow that triggers basic linting tasks for commits in the development branch",
"iconName": "demo-icon",
"categories": [
"Python"
]
}
20 changes: 20 additions & 0 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint code

on: [push, pull_request]

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-22.04
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Run pre-commit
uses: pre-commit/[email protected]
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Package Release
on:
push:
tags:
- "v*.*.*"
jobs:
build-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.TEST_PYPI_TOKEN }}
repository_name: "python-easyverein"
repository_url: "https://test.pypi.org/legacy/"
python_version: "3.11.6"
poetry_version: "==1.6.1"
release:
runs-on: ubuntu-22.04
environment: production
steps:
- uses: actions/checkout@v2
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
repository_name: "python-easyverein"
python_version: "3.11.3"
poetry_version: "==1.6.1"

0 comments on commit 7801a11

Please sign in to comment.