Skip to content

Commit

Permalink
Optimize workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Apr 14, 2022
1 parent c54b54f commit 5540c4f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 57 deletions.
36 changes: 14 additions & 22 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@ on:
pull_request:

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ '3.9' ]
os: [ ubuntu-latest ]

generate_and_upload_report:
name: Generate and upload coverage report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
python-version: 3.8

- name: Install dependencies
run: |
Expand All @@ -34,17 +28,15 @@ jobs:
coverage combine
coverage xml
- name: Code Coverage Summary Report
uses: irongut/CodeCoverageSummary@v1.2.0
- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
filename: coverage.xml
format: markdown
badge: true
output: console
token: ${{ secrets.CODECOV_PROJECT_TOKEN }} # during `pull_request` event this field is empty
files: ./coverage.xml

- uses: actions/upload-artifact@v2
- name: Upload to Codacy
if: github.event_name == 'push'
uses: codacy/codacy-coverage-reporter-action@v1
with:
name: coverage_report
path: ./coverage.xml


project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage.xml
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: actions/setup-python@v3
with:
python-version: '3.8'
python-version: 3.8

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8']
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: [ '3.8' ]
os: [ macos-latest, windows-latest, ubuntu-latest ]

steps:
- uses: actions/checkout@v3
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/upload_coverage.yml

This file was deleted.

0 comments on commit 5540c4f

Please sign in to comment.