diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b08c02f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI +on: + push: + branches: + - main + - dev + pull_request: + branches: + - main + - dev + +jobs: + test: + runs-on: ubuntu-latest + + services: + redis: + image: redis:6-alpine + ports: + - 6379:6379 + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + + - name: Install pipenv + run: pip install pipenv + working-directory: src + + - name: Install dependencies + run: pipenv install --dev + working-directory: src + + - name: Run tests + run: pipenv run PYTHONPATH=. pytest -v --color=yes tests/ + working-directory: src \ No newline at end of file