mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added mongo storage testing in CI
This commit is contained in:
parent
0fce314c83
commit
90949596a0
1 changed files with 20 additions and 3 deletions
23
.github/workflows/tests.yml
vendored
23
.github/workflows/tests.yml
vendored
|
|
@ -60,7 +60,7 @@ jobs:
|
|||
|
||||
- name: Install project dependencies
|
||||
run: |
|
||||
pip install -e .[dev,test,redis,proxy,i18n,fast]
|
||||
pip install -e .[dev,test,redis,mongo,proxy,i18n,fast]
|
||||
|
||||
- name: Lint code
|
||||
run: |
|
||||
|
|
@ -74,10 +74,19 @@ jobs:
|
|||
with:
|
||||
redis-version: 6
|
||||
|
||||
- name: Setup mongodb
|
||||
if: ${{ env.IS_WINDOWS == 'false' }}
|
||||
uses: supercharge/mongodb-github-action@1.10.0
|
||||
with:
|
||||
mongodb-version: '7.0'
|
||||
mongodb-username: mongo
|
||||
mongodb-password: mongo
|
||||
mongodb-port: 27017
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
flags="$flags --cov=aiogram --cov-config .coveragerc --cov-report=xml"
|
||||
[[ "$IS_WINDOWS" == "false" ]] && flags="$flags --redis redis://localhost:6379/0"
|
||||
[[ "$IS_WINDOWS" == "false" ]] && flags="$flags --redis redis://localhost:6379/0 --mongo mongodb://mongo:mongo@localhost:27017"
|
||||
pytest $flags
|
||||
|
||||
- name: Upload coverage data
|
||||
|
|
@ -121,13 +130,21 @@ jobs:
|
|||
|
||||
- name: Install project dependencies
|
||||
run: |
|
||||
pip install -e .[dev,test,redis,proxy,i18n,fast]
|
||||
pip install -e .[dev,test,redis,mongo,proxy,i18n,fast]
|
||||
|
||||
- name: Setup redis
|
||||
uses: shogo82148/actions-setup-redis@v1
|
||||
with:
|
||||
redis-version: 6
|
||||
|
||||
- name: Setup mongodb
|
||||
uses: supercharge/mongodb-github-action@1.10.0
|
||||
with:
|
||||
mongodb-version: '7.0'
|
||||
mongodb-username: mongo
|
||||
mongodb-password: mongo
|
||||
mongodb-port: 27017
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
flags=""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue