Revert "Fix all the nasty stuff" #328
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: CI | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:13 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: 1234 | |
POSTGRES_DB: xian | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.11.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11.8' | |
- name: Install system dependencies | |
run: sudo apt-get update && sudo apt-get install -y pkg-config libhdf5-dev build-essential | |
- name: Clone xian-contracting repository | |
run: git clone https://github.com/xian-network/xian-contracting.git | |
- name: Set up Python environment | |
run: python3.11 -m venv xian_venv | |
- name: Activate virtual environment and install dependencies | |
run: | | |
source xian_venv/bin/activate | |
pip install -e xian-contracting/ -e . | |
pip install pytest # Install pytest explicitly | |
- name: Run tests | |
env: | |
DATABASE_URL: postgres://postgres:1234@localhost:5432/xian | |
run: | | |
source xian_venv/bin/activate | |
pytest tests |