Simplified import #770
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Unit Tests | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
unit_tests: | |
strategy: | |
matrix: | |
python-version: [ '3.10' ] | |
max-parallel: 1 | |
runs-on: ubuntu-latest | |
env: | |
PYKLATCHAT_TESTING_CREDENTIALS: ${{ secrets.PYKLATCHAT_TESTING_CREDENTIALS }} | |
KLAT_ENV: ${{ secrets.SERVER_ENV }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements/requirements.txt | |
pip install -r requirements/test_requirements.txt | |
pip install -r requirements/legacy_migration_requirements.txt | |
- name: Get Credential | |
run: | | |
mkdir -p ~/.local/share/neon | |
echo $PYKLATCHAT_TESTING_CREDENTIALS > ~/.local/share/neon/credentials.json | |
- name: Test DB Utils | |
run: | | |
pytest tests/test_db_utils.py --doctest-modules --junitxml=tests/db-utils-test-results.xml | |
- name: Upload DB Utils test results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: db-utils-test-results | |
path: tests/db-utils-test-results.xml | |
- name: Test SIO | |
run: | | |
pytest chat_server/tests/test_sio.py --doctest-modules --junitxml=tests/sio-test-results.xml | |
- name: Upload SIO test results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: sio-test-results | |
path: tests/sio-test-results.xml | |
build_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.10' | |
- name: Install Build Tools | |
run: | | |
python -m pip install build wheel | |
- name: Build Distribution Packages | |
run: | | |
python setup.py bdist_wheel |