Merge pull request #8 from RocketMaDev/main #80
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: CI | |
| on: [push] | |
| jobs: | |
| test-python-3-10: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-in-project: false | |
| virtualenvs-path: ~/.virtualenvs | |
| - name: Cache poetry virtualenv | |
| id: cache-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.virtualenvs | |
| key: venv-3-10-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Dependencies | |
| if: steps.cache-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction | |
| - name: Run tests | |
| run: poetry run python -m unittest | |
| test-python-3-11: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-in-project: false | |
| virtualenvs-path: ~/.virtualenvs | |
| - name: Cache poetry virtualenv | |
| id: cache-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.virtualenvs | |
| key: venv-3-11-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Dependencies | |
| if: steps.cache-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction | |
| - name: Run tests | |
| run: poetry run python -m unittest | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-in-project: false | |
| virtualenvs-path: ~/.virtualenvs | |
| - name: Cache poetry virtualenv | |
| id: cache-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.virtualenvs | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Dependencies | |
| if: steps.cache-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction | |
| - name: Format code | |
| run: poetry run black . --check | |