ci: add lint.yml and separate test pipeline #1
This file contains hidden or 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: DMI_bot_deploy | |
| on: | |
| push: | |
| branches: [master] | |
| paths-ignore: | |
| - "README.md" | |
| - "docs/**" | |
| pull_request: | |
| branches: [master] | |
| paths-ignore: | |
| - "README.md" | |
| - "docs/**" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.9", "3.10"] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python 3.x | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies for requirements and testing | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi | |
| # - name: Setup enviroment | |
| # run: | | |
| # mv config/settings.yaml.dist config/settings.yaml | |
| # mv data/DMI_DB.db.dist data/DMI_DB.db | |
| # python3 setup.py useless_token --test_api_id ${{secrets.API_ID}} \ | |
| # --test_api_hash ${{secrets.API_HASH}} --test_session ${{secrets.SESSION}} \ | |
| # --test_tag ${{secrets.TEST_TAG}} --test_token ${{secrets.TEST_TOKEN}} \ | |
| # --test_representatives_group ${{secrets.TEST_USER_ID}} --test_dev_group_chatid ${{secrets.TEST_USER_ID}} | |
| - name: Unit test | |
| run: pytest tests/unit/ | |
| # - name: End-to-end test | |
| # run: pytest tests/e2e/ |