mirror of
https://github.com/ihabunek/toot.git
synced 2024-11-03 04:17:21 -05:00
wip
This commit is contained in:
parent
9baa0823f9
commit
cae231eddf
54
.github/workflows/test.yml
vendored
54
.github/workflows/test.yml
vendored
@ -4,12 +4,21 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
# Older Ubuntu required for testing on Python 3.6 which is not available in
|
||||
# later versions. Remove once support for 3.6 is dropped.
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||
python-version: ["3.11"]
|
||||
|
||||
# https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@ -17,17 +26,28 @@ jobs:
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
- name: Install Mastodon
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e .
|
||||
pip install -r requirements-test.txt
|
||||
- name: Run tests
|
||||
run: |
|
||||
pytest
|
||||
- name: Validate minimum required version
|
||||
run: |
|
||||
vermin --target=3.6 --no-tips .
|
||||
- name: Check style
|
||||
run: |
|
||||
flake8
|
||||
wget https://github.com/mastodon/mastodon/archive/refs/tags/v4.1.0.zip
|
||||
unzip v4.1.0.zip
|
||||
cd mastodon-4.1.0
|
||||
ls -al
|
||||
- name: Run integration tests
|
||||
env:
|
||||
TOOT_TEST_HOSTNAME: localhost:3000
|
||||
TOOT_TEST_DATABASE_DSN: dbname=mastodon_development
|
||||
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip
|
||||
# pip install -e .
|
||||
# pip install -r requirements-test.txt
|
||||
# - name: Run tests
|
||||
# run: |
|
||||
# pytest
|
||||
# - name: Validate minimum required version
|
||||
# run: |
|
||||
# vermin --target=3.6 --no-tips .
|
||||
# - name: Check style
|
||||
# run: |
|
||||
# flake8
|
||||
|
@ -9,6 +9,7 @@
|
||||
- [Contributing](contributing.md)
|
||||
- [Documentation](documentation.md)
|
||||
- [Release procedure](release.md)
|
||||
- [Running tests](testing.md)
|
||||
- [Changelog](changelog.md)
|
||||
|
||||
[License](license.md)
|
||||
|
16
docs/testing.md
Normal file
16
docs/testing.md
Normal file
@ -0,0 +1,16 @@
|
||||
Running tests
|
||||
=============
|
||||
|
||||
Run unit tests by just invoking:
|
||||
|
||||
```
|
||||
pytest
|
||||
```
|
||||
|
||||
However, many tests are implemented as integration tests which require a local
|
||||
mastodon instance to be running.
|
||||
|
||||
## Setting up a test mastodon instance
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user