2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

[CI] Optimize runs (#6991)

* only run backend if required

* alwass upload coverage
This commit is contained in:
Matthias Mair 2024-04-10 09:45:57 +01:00 committed by GitHub
parent 77c8a9d255
commit 80475c57b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -220,7 +220,8 @@ jobs:
name: Tests - inventree-python name: Tests - inventree-python
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
needs: pre-commit needs: [ 'pre-commit', 'paths-filter' ]
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
env: env:
wrapper_name: inventree-python wrapper_name: inventree-python
@ -261,7 +262,8 @@ jobs:
name: Tests - DB [SQLite] + Coverage name: Tests - DB [SQLite] + Coverage
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
needs: [ 'pre-commit' ] needs: [ 'pre-commit', 'paths-filter' ]
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
continue-on-error: true # continue if a step fails so that coverage gets pushed continue-on-error: true # continue if a step fails so that coverage gets pushed
env: env:
@ -298,6 +300,7 @@ jobs:
parallel: true parallel: true
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1 uses: codecov/codecov-action@v4.0.1
if: always()
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
slug: inventree/InvenTree slug: inventree/InvenTree
@ -306,7 +309,8 @@ jobs:
postgres: postgres:
name: Tests - DB [PostgreSQL] name: Tests - DB [PostgreSQL]
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
needs: [ 'pre-commit' ] needs: [ 'pre-commit', 'paths-filter' ]
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
env: env:
INVENTREE_DB_ENGINE: django.db.backends.postgresql INVENTREE_DB_ENGINE: django.db.backends.postgresql
@ -350,7 +354,8 @@ jobs:
name: Tests - DB [MySQL] name: Tests - DB [MySQL]
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
needs: [ 'pre-commit' ] needs: [ 'pre-commit', 'paths-filter' ]
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
env: env:
# Database backend configuration # Database backend configuration
@ -435,6 +440,7 @@ jobs:
git-branch: ${{ github.ref }} git-branch: ${{ github.ref }}
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1 uses: codecov/codecov-action@v4.0.1
if: always()
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
slug: inventree/InvenTree slug: inventree/InvenTree
@ -539,6 +545,7 @@ jobs:
parallel: true parallel: true
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1 uses: codecov/codecov-action@v4.0.1
if: always()
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
slug: inventree/InvenTree slug: inventree/InvenTree