Skip to content

Commit

Permalink
Speeding up CI build (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet authored Aug 9, 2024
1 parent f0facdb commit ed05e61
Showing 1 changed file with 26 additions and 33 deletions.
59 changes: 26 additions & 33 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ on:
permissions: write-all

jobs:
tests:
runs-on: ubuntu-20.04
unit:
runs-on: ubuntu-22.04
strategy:
matrix:
test:
- utests
- tests-api-mock
- tests-server
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -28,19 +34,28 @@ jobs:
working-directory: bert_e/tests/images
- name: Install tox
run: pip install tox
- run: tox -e utests
- run: tox -e tests-api-mock
- run: tox -e ${{ matrix.test }}
- run: tox -e coverage-report
- run: tox -e tests-server
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
flags: unittests,server,api-mock
flags: ${{ matrix.test }}

tests-noqueue:
runs-on: ubuntu-20.04
integration:
strategy:
matrix:
test:
- tests-noqueue
- tests
class:
- BuildFailedTest
- RepositoryTests
- TestBertE
- TestQueueing
- TaskQueueTests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -53,38 +68,16 @@ jobs:
run: pip install -r requirements.txt
- name: Install tox
run: pip install tox
- run: tox -e tests-noqueue
- run: tox -e ${{ matrix.test }} -- ${{ matrix.class }}
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
flags: tests-noqueue

all-tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install tox
run: pip install tox
- run: tox -e tests
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
flags: all-tests
flags: ${{ matrix.test }}-${{ matrix.class }}

lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit ed05e61

Please sign in to comment.