2022-10-20 13:30:44 +00:00
|
|
|
name: "Test: Coordinator"
|
2022-07-13 18:55:30 +00:00
|
|
|
|
|
|
|
on:
|
2022-07-13 20:40:58 +00:00
|
|
|
workflow_dispatch:
|
2022-09-20 17:39:49 +00:00
|
|
|
workflow_call:
|
2022-07-13 18:55:30 +00:00
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
paths: ["api", "chat", "control", "robosats"]
|
2023-10-23 22:48:38 +00:00
|
|
|
pull_request_target:
|
2022-07-13 18:55:30 +00:00
|
|
|
branches: [ "main" ]
|
|
|
|
paths: ["api", "chat", "control", "robosats"]
|
|
|
|
|
2023-10-23 22:48:38 +00:00
|
|
|
concurrency:
|
|
|
|
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
|
|
|
cancel-in-progress: true
|
2022-10-25 18:04:12 +00:00
|
|
|
|
2022-07-13 18:55:30 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
max-parallel: 4
|
|
|
|
matrix:
|
2023-11-06 23:13:23 +00:00
|
|
|
python-version: ["3.11.6", "3.12"]
|
2023-11-12 12:39:39 +00:00
|
|
|
lnd-version: ["v0.17.0-beta","v0.17.1-beta.rc1"]
|
2022-07-13 18:55:30 +00:00
|
|
|
|
|
|
|
steps:
|
2022-07-13 20:40:58 +00:00
|
|
|
- name: 'Checkout'
|
2023-09-11 16:00:32 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-10-23 22:48:38 +00:00
|
|
|
|
2023-11-12 12:39:39 +00:00
|
|
|
- name: 'Compose Eegtest Orchestration'
|
|
|
|
uses: isbang/compose-action@v1.5.1
|
2022-07-13 18:55:30 +00:00
|
|
|
with:
|
2023-11-12 12:39:39 +00:00
|
|
|
compose-file: "docker-test.yml"
|
|
|
|
env: "tests/compose.env"
|
2023-10-23 22:48:38 +00:00
|
|
|
|
2023-11-12 12:39:39 +00:00
|
|
|
# - name: 'Set up Python ${{ matrix.python-version }}'
|
|
|
|
# uses: actions/setup-python@v4
|
|
|
|
# with:
|
|
|
|
# python-version: ${{ matrix.python-version }}
|
2023-10-23 22:48:38 +00:00
|
|
|
|
2023-11-12 12:39:39 +00:00
|
|
|
# - name: 'Cache pip dependencies'
|
|
|
|
# uses: actions/cache@v3
|
|
|
|
# with:
|
|
|
|
# path: ~/.cache/pip
|
|
|
|
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
|
|
# restore-keys: |
|
|
|
|
# ${{ runner.os }}-pip-
|
2023-10-23 22:48:38 +00:00
|
|
|
|
2023-11-12 12:39:39 +00:00
|
|
|
# - name: 'Install Python Dependencies'
|
|
|
|
# run: |
|
|
|
|
# python -m pip install --upgrade pip
|
|
|
|
# pip install -r requirements.txt
|
|
|
|
# pip install -r requirements_dev.txt
|
2023-10-23 22:48:38 +00:00
|
|
|
|
2023-11-12 12:39:39 +00:00
|
|
|
# - name: 'Install LND/CLN gRPC Dependencies'
|
|
|
|
# run: bash ./scripts/generate_grpc.sh
|
2023-10-23 22:48:38 +00:00
|
|
|
|
2023-11-12 12:39:39 +00:00
|
|
|
# - name: 'Create .env File'
|
|
|
|
# run: |
|
|
|
|
# mv .env-sample .env
|
|
|
|
# sed -i "s/USE_TOR=True/USE_TOR=False/" .env
|
|
|
|
|
|
|
|
# - name: 'Wait for PostgreSQL to become ready'
|
|
|
|
# run: |
|
|
|
|
# sudo apt-get install -y postgresql-client
|
|
|
|
# until pg_isready -h localhost -p 5432 -U postgres; do sleep 2; done
|
2023-10-23 22:48:38 +00:00
|
|
|
|
|
|
|
- name: 'Run tests with coverage'
|
2022-07-13 18:55:30 +00:00
|
|
|
run: |
|
2023-11-12 12:39:39 +00:00
|
|
|
docker exec coordinator coverage run manage.py test
|
|
|
|
docker exec coordinator coverage report
|
|
|
|
|
|
|
|
|
|
|
|
# jobs:
|
|
|
|
# test:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v2
|
|
|
|
# - name: Run Docker Compose
|
|
|
|
# run: |
|
|
|
|
# docker-compose up -d
|
|
|
|
# docker-compose run web python manage.py test
|