Skip to content

Commit

Permalink
remove yaml, new workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mariofix committed Jan 20, 2025
1 parent 366d3fa commit c072ed5
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 20,890 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/new_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: New Release

on:
release:
types: [published]
types:
- published

permissions:
contents: write
Expand All @@ -12,8 +13,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
poetry-version: ["1.8.3"]
python-version: ["3.9"]
poetry-version: ["2.0.1"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -27,16 +28,16 @@ jobs:
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install pyflowcl
run: poetry install --with dev
run: poetry install --all-extras
- name: Run Tests
run: poetry run pytest

docs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
poetry-version: ["1.8.3"]
python-version: ["3.9"]
poetry-version: ["2.0.1"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
needs: crosscheck
Expand All @@ -60,8 +61,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
poetry-version: ["1.8.3"]
python-version: ["3.9"]
poetry-version: ["2.0.1"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
needs: crosscheck
Expand All @@ -77,7 +78,7 @@ jobs:
- name: Set Up Poetry
uses: abatilo/actions-poetry@v4
- name: Install django-payments-flow
run: poetry install --with dev
run: poetry install --all-extras
- name: Build pyflowcl
run: poetry build
- name: Publish package distributions to PyPI
Expand Down
58 changes: 49 additions & 9 deletions .github/workflows/tests_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,80 @@ name: Tests&Coverage

on:
push:
branches: ["main"]
branches:
- main
pull_request:
branches: ["main"]
branches:
- main
workflow_dispatch:

jobs:
tests:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
poetry-version: ["1.8.3"]
poetry-version: ["2.0.1"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for better coverage reporting

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# cache: "poetry" # Enable poetry caching

- name: Set Up Poetry
uses: abatilo/actions-poetry@v4
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install pyFlowCL
run: poetry install --with dev
- name: Run Tests and coverage
run: poetry run coverage run -m pytest
- name: Coverage report (xml)
run: poetry run coverage xml

- name: Install dependencies
run: |
poetry config virtualenvs.create true
poetry install --all-extras --no-interaction
- name: Run tests with coverage
env:
PYTHONPATH: ${{ github.workspace }}
run: |
poetry run coverage erase
poetry run pytest \
--cov-report=xml \
--cov-report=term \
--cov-branch \
-v
poetry run coverage xml
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: "coverage.xml"
language: "python"

- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
path: coverage.xml
retention-days: 14

codacy-analysis-cli:
name: Codacy Analysis CLI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@master
3 changes: 1 addition & 2 deletions pyflowcl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from .openapi3 import FlowAPI
from .version import __version__

__all__ = ["FlowAPI", "__version__"]
__all__ = [ "__version__"]
Loading

0 comments on commit c072ed5

Please sign in to comment.