Skip to content

Commit

Permalink
Improve CI workflow (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
durandtibo committed May 17, 2023
1 parent 80210df commit 4f88949
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 58 deletions.
74 changes: 64 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,6 @@ jobs:
run: |
poetry run make unit-test-cov
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' && github.repository == 'durandtibo/redcat' && (github.event_name == 'push' || github.event_name == 'pull_request')
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
# Ignore codecov failures as the codecov server is not
# very reliable but we don't want to report a failure
# in the github UI just because the coverage report failed to
# be published.
fail_ci_if_error: false
test-minimal:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -107,3 +97,67 @@ jobs:
- name: Run unit tests
run: |
poetry run make unit-test-cov
coverage:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
max-parallel: 8
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.10' ]

steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install packages
run: |
poetry run make config-poetry
poetry run make install
- name: Show installed packages
run: |
poetry run poetry show
poetry run poetry show --tree
- name: Format
run: |
poetry run make format
- name: Lint
run: |
poetry run make lint
- name: Run unit tests
run: |
poetry run make unit-test-cov
- name: Upload coverage to Codecov
if: github.repository == 'durandtibo/redcat' && (github.event_name == 'push' || github.event_name == 'pull_request')
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
# Ignore codecov failures as the codecov server is not
# very reliable but we don't want to report a failure
# in the github UI just because the coverage report failed to
# be published.
fail_ci_if_error: false

- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v4.0.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageLocations: ./coverage.xml:coverage.py
debug: true
48 changes: 0 additions & 48 deletions .github/workflows/deps.yaml

This file was deleted.

0 comments on commit 4f88949

Please sign in to comment.