Skip to content

test ci

test ci #7

Workflow file for this run

name: Run tests
on:
push:
branches:
- "*"
pull_request:
branches: ["master"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: snok/install-poetry@v1
with:
version: 1.6.1
virtualenvs-create: true
virtualenvs-in-project: true
- uses: actions/cache@v3
with:
path: .venv
key: venv-${{ hashFiles('poetry.lock') }}
- run: poetry install --no-interaction --no-root
- run: cd /home/runner/work/hknweb && ls && ls hknweb
- name: Run formatting check
run: |
cd /home/runner/work/hknweb && poetry run black . --check --exclude=.venv
- name: Run unit tests
run: |
poetry run coverage run
poetry run coverage report
- name: Deploy
run: |
poetry run fab deploy
- name: Run end-to-end tests
run: |
poetry run curl -f localhost:8000