Skip to content

Commit

Permalink
Updated CI test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Jan 16, 2024
1 parent 5de2d0f commit 7688208
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,23 @@ jobs:
- name: Start external services
run: docker-compose up -d
- name: Install dependencies
run: pip install .[test] coveralls
run: pip install .[test]
- name: Test with pytest
run: coverage run -m pytest
env:
MYSQL_URL: mysql+pymysql://root@localhost:33060/asphalttest
POSTGRESQL_URL: postgresql+psycopg://postgres:secret@localhost:54320/asphalttest
run: coverage run -m pytest -v
- name: Generate coverage report
run: coverage xml
- name: Upload Coverage
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
uses: coverallsapp/github-action@v2
with:
parallel: true
file: coverage.xml

coveralls:
name: Finish Coveralls
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip install coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ test = [
"anyio >= 4.2",
"asyncmy; platform_python_implementation == 'CPython'",
"asyncpg; platform_python_implementation == 'CPython'",
"coverage >= 7",
"pymysql",
"psycopg >= 3.1; platform_python_implementation == 'CPython'",
"pytest",
"pytest >= 7.4",
"pytest-lazy-fixture",
]
doc = [
Expand Down

0 comments on commit 7688208

Please sign in to comment.