Skip to content

Commit

Permalink
splitting actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-cassese committed Apr 15, 2024
1 parent d3a8600 commit 30b00b9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 17 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
- pull_request

jobs:
build:
tests:
name: "Python ${{ matrix.python-version }} on ${{ matrix.platform }}"
runs-on: ${{ matrix.platform }}
strategy:
matrix:
Expand All @@ -26,10 +27,27 @@ jobs:
run: tox
env:
PLATFORM: ${{ matrix.platform }}
# working-directory: ${{ github.workspace }}

coverage:
name: "Coverage"
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install coverage
- name: Combine coverage data
run: |
coverage combine
coverage xml
- name: Coveralls GitHub Action
if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: coverallsapp/github-action@v2.2.3
with:
file: ${{ github.workspace }}/coverage.xml

file: coverage.xml

24 changes: 12 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tox]
envlist =
clean
; clean
py{38,39,310,311}-{linux,macos}
report
; report

[gh-actions]
python =
Expand Down Expand Up @@ -32,13 +32,13 @@ commands =
; skip_install = true
; commands = -coverage erase

[testenv:report]
basepython = python3.10
deps = coverage
depends = py38,py39,py310,py311
parallel_show_output = true
skip_install = true
commands =
-coverage combine
-coverage report
-coverage xml -o {toxinidir}/coverage.xml
; [testenv:report]
; basepython = py311
; deps = coverage
; ; depends = py38,py39,py310,py311
; parallel_show_output = true
; skip_install = true
; commands =
; -coverage combine
; -coverage report
; -coverage xml

0 comments on commit 30b00b9

Please sign in to comment.