Skip to content

Commit

Permalink
Replaced CI workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Mar 2, 2024
1 parent 6f43456 commit 22d8d8d
Showing 1 changed file with 28 additions and 44 deletions.
72 changes: 28 additions & 44 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,47 @@ on:
push:
branches:
- "main"
- "develop"
# - "develop"
pull_request:
branches: [main, develop]
branches: [main]

jobs:
build:
name: build
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.1.11"
poetry-version: "1.6.1"
- name: Build
run: |
poetry install
poetry build
- uses: actions/[email protected]
with:
name: dist
path: dist
- uses: actions/[email protected]
with:
name: output
path: output

run-unit-tests:
name: test-unit
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python: ["3.7", "3.8", "3.9", "3.10", "pypy-3.8"]
poetry-version: ["1.1.11"]
fail-fast: false
runs-on: ${{ matrix.os }}
needs:
- build
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: run tests
- name: Test
run: |
poetry install
poetry run pytest --junitxml=test-results/results.xml --cov=./ --cov-report=xml tests
- uses: actions/[email protected]
poetry add --group dev pytest-cov
poetry run pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov=com --cov-report=xml --cov-report=html
- name: Test summary
uses: test-summary/action@v2
with:
name: unit tests test-results
path: test-results
paths: "junit/*.xml"
if: always()
# - uses: actions/upload-artifact@v4
# with:
# name: dist
# path: dist
# - uses: actions/upload-artifact@v4
# with:
# name: output
# path: output

0 comments on commit 22d8d8d

Please sign in to comment.